qtdemux: Use upstream's StreamFlags if there are

When multiple demuxer's are used, upstream might want to indicate
default streams using GST_STREAM_FLAG_{SELECT, UNSELECT}

https://bugzilla.gnome.org/show_bug.cgi?id=775440
This commit is contained in:
Seungha Yang 2016-12-01 12:47:08 +09:00 committed by Edward Hervey
parent af47e93b97
commit d3f5aa2689

View file

@ -7769,12 +7769,13 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
if (stream->new_stream) {
gchar *stream_id;
GstEvent *event;
GstStreamFlags stream_flags;
GstStreamFlags stream_flags = GST_STREAM_FLAG_NONE;
event =
gst_pad_get_sticky_event (qtdemux->sinkpad, GST_EVENT_STREAM_START,
0);
if (event) {
gst_event_parse_stream_flags (event, &stream_flags);
if (gst_event_parse_group_id (event, &qtdemux->group_id))
qtdemux->have_group_id = TRUE;
else
@ -7792,11 +7793,13 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
event = gst_event_new_stream_start (stream_id);
if (qtdemux->have_group_id)
gst_event_set_group_id (event, qtdemux->group_id);
stream_flags = GST_STREAM_FLAG_NONE;
if (stream->disabled)
stream_flags |= GST_STREAM_FLAG_UNSELECT;
if (stream->sparse)
if (stream->sparse) {
stream_flags |= GST_STREAM_FLAG_SPARSE;
} else {
stream_flags &= ~GST_STREAM_FLAG_SPARSE;
}
gst_event_set_stream_flags (event, stream_flags);
gst_pad_push_event (stream->pad, event);
g_free (stream_id);