[Bug 738285] playbin: Sequential playback of the file list does not work

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Oct 20 04:15:24 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=738285
  GStreamer | gst-plugins-base | git

Sebastian Dröge (slomo) <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #288885|none                        |needs-work
             status|                            |

--- Comment #10 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-10-20 11:15:18 UTC ---
Review of attachment 288885:
 --> (https://bugzilla.gnome.org/review?bug=738285&attachment=288885)

::: gst/playback/gstdecodebin2.c
@@ +3752,2 @@
     g_signal_emit (dbin, gst_decode_bin_signals[SIGNAL_DRAINED], 0, NULL);
+    g_cond_broadcast (&dbin->all_eos_cond);

You should use a mutex here (the object lock), and also store the information
that we're all-eos now...

@@ +3782,3 @@
+  if (last_group && !drained) {
+    GST_OBJECT_LOCK (dbin);
+    g_cond_wait (&dbin->all_eos_cond, GST_OBJECT_GET_LOCK (dbin));

... and here check after locking before g_cond_wait() if all are EOS already.
Otherwise you have a race condition here.

Also note that g_cond_wait() can be triggered spuriously under certain
conditions, so you need a loop like

while (not_all_eos) g_cond_wait();

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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