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
This commit is contained in:
Seungha Yang 2017-07-19 13:39:52 +09:00 committed by Edward Hervey
parent afa2cbf39b
commit 7a236e2302

View file

@ -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);