urisourcebin: Call do_async_done when source state change returns NO_PREROLL
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Wed, 14 Jun 2017 21:04:18 +0000 (17:04 -0400)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Thu, 15 Jun 2017 18:35:06 +0000 (14:35 -0400)
Otherwise for RTSP streams for example, the pipeline will never go to
PLAYING as it will be missing an ASYNC_DONE message.

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

gst/playback/gsturisourcebin.c

index 39c4cae..03da4a9 100644 (file)
@@ -2943,8 +2943,11 @@ gst_uri_source_bin_change_state (GstElement * element,
         ret = gst_element_set_state (urisrc->source, GST_STATE_PAUSED);
       if (ret == GST_STATE_CHANGE_FAILURE)
         goto setup_failed;
+
       if (ret == GST_STATE_CHANGE_SUCCESS)
         ret = GST_STATE_CHANGE_ASYNC;
+      else if (ret == GST_STATE_CHANGE_NO_PREROLL)
+        do_async_done (urisrc);
 
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY: