[Bug 756000] gstrtmpsink: add unlock

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Mar 29 23:38:15 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=756000

Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #324976|none                        |reviewed
             status|                            |

--- Comment #6 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
Review of attachment 324976:
 --> (https://bugzilla.gnome.org/review?bug=756000&attachment=324976)

::: ext/rtmp/gstrtmpsink.c
@@ +227,3 @@
+        the socket comes up */
+    while (sink->connecting && sink->rtmp->m_sb.sb_socket == -1) {
+      g_thread_yield ();

Could be slightly cleaner and more efficient using a GCond here.

::: ext/rtmp/gstrtmpsink.h
@@ +53,3 @@
   RTMP *rtmp;
   gchar *rtmp_uri; /* copy of url for librtmp */
+  GMutex rtmp_lock;

I believe with some effort, using the stream lock should be possible. This way,
you would have unlock() that always do shutdown, and unlock_stop() (which have
the state lock held) that always do RTMP_Close(). Any other blocking operation
should be done where the stream lock is held already, if not, that's a bug.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list