From 7a236e23022b26b3afc1eb4f718dc4978c34a747 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 19 Jul 2017 13:39:52 +0900 Subject: [PATCH] playbin3: Delay linking text output until video stream is shown We are not sure that which stream's collection arrives first when there are multiple parsebins such as adaptive streaming. https://bugzilla.gnome.org/show_bug.cgi?id=785120 --- gst/playback/gstplaybin3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/playback/gstplaybin3.c b/gst/playback/gstplaybin3.c index 4e2e08568a..611b82cf2a 100644 --- a/gst/playback/gstplaybin3.c +++ b/gst/playback/gstplaybin3.c @@ -2907,7 +2907,10 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstPlayBin3 * playbin) /* If we're expecting either audio or video, * wait for them to appear before configuring playsink */ - if ((playbin->selected_stream_types & ~playbin->active_stream_types & + if ((playbin->active_stream_types & GST_STREAM_TYPE_TEXT) && + !(playbin->active_stream_types & GST_STREAM_TYPE_VIDEO)) { + GST_LOG_OBJECT (playbin, "Have text stream but no video yet, Wating"); + } else if ((playbin->selected_stream_types & ~playbin->active_stream_types & (GST_STREAM_TYPE_VIDEO | GST_STREAM_TYPE_AUDIO)) == 0) { no_more_pads_cb (decodebin, playbin);