GNOME Bugzilla – Bug 761702
rtsp-thread-pool: explain why GSource is a part of GstRTSPThreadImpl
Last modified: 2016-04-06 08:57:40 UTC
Created attachment 320612 [details] [review] rtsp-thread-pool: explained why GSource is a part of GstRTSPThreadImpl Currently, there is no explanation why it is necessary to add source information to GstRTSPThreadImpl. The suggested patch adds a comment explaining the reason of the source being a part of TheadImpl. The patch adds as well error handling in _thread_stop().
Review of attachment 320612 [details] [review]: ::: gst/rtsp-server/rtsp-thread-pool.c @@ +180,3 @@ g_source_set_callback (impl->source, (GSourceFunc) do_quit, thread, (GDestroyNotify) gst_rtsp_thread_unref); + if (G_UNLIKELY (g_source_attach (impl->source, thread->context) <= 0)) { From the code of g_source_attach() it's actually impossible to get 0 here (and < 0 anyway as it's unsigned).
Patricia?
Sebastian, you're right. Only the FIXME comment should be included in the suggested patch.
Can you update the patch?
Created attachment 325462 [details] [review] explained why GSource is a part of ThreadImpl
Thanks, pushed: commit f0891e2cdf32489d9a3393188e4782d9f8f91d09 Author: Patricia Muscalu <patricia@axis.com> Date: Wed Apr 6 10:09:46 2016 +0200 rtsp-thread-pool: explained why GSource is a part of ThreadImpl Clarified why it is necessary to add source information to GstRTSPThreadImpl. See the reported bug in GLib: https://bugzilla.gnome.org/show_bug.cgi?id=720186 for more information. https://bugzilla.gnome.org/show_bug.cgi?id=761702