playbin/uridecodebin: Always post async-done immediately if we're a live pipeline
authorSebastian Dröge <sebastian@centricular.com>
Sat, 17 Oct 2015 18:47:07 +0000 (21:47 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 20 Oct 2015 07:16:06 +0000 (10:16 +0300)
Not only if the base class told us, but also if one of our own elements did.

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

gst/playback/gstplaybin2.c
gst/playback/gsturidecodebin.c

index 0fde6c2..050cd89 100644 (file)
@@ -5774,6 +5774,9 @@ gst_play_bin_change_state (GstElement * element, GstStateChange transition)
       break;
   }
 
+  if (ret == GST_STATE_CHANGE_NO_PREROLL)
+    do_async_done (playbin);
+
   return ret;
 
   /* ERRORS */
index 24e4427..2a4e7bc 100644 (file)
@@ -2752,8 +2752,6 @@ gst_uri_decode_bin_change_state (GstElement * element,
   ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
   if (ret == GST_STATE_CHANGE_FAILURE)
     goto setup_failed;
-  else if (ret == GST_STATE_CHANGE_NO_PREROLL)
-    do_async_done (decoder);
 
   switch (transition) {
     case GST_STATE_CHANGE_READY_TO_PAUSED:
@@ -2799,6 +2797,10 @@ gst_uri_decode_bin_change_state (GstElement * element,
     default:
       break;
   }
+
+  if (ret == GST_STATE_CHANGE_NO_PREROLL)
+    do_async_done (decoder);
+
   return ret;
 
   /* ERRORS */