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 0fde6c2f8d4de5342835c9f24ac774aff25a1b4a..050cd898a5b0d4c8c1341e03185d885b5d59cadd 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 24e44278027e6b29698c78b6f5ee151c3d2e3e6b..2a4e7bca7c2de2f82f1d6dd200d30035b4614501 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 */