matroskademux: tag disabled streams with FLAG_UNSELECT
authorTim-Philipp Müller <tim@centricular.com>
Sun, 13 May 2018 23:29:24 +0000 (00:29 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 15 May 2018 09:25:35 +0000 (10:25 +0100)
So they're never picked as default, only by explicit
user action.

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

gst/matroska/matroska-demux.c

index fa9edc7..022f755 100644 (file)
@@ -1512,6 +1512,9 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
     stream_flags |= GST_STREAM_FLAG_SPARSE;
   if (context->flags & GST_MATROSKA_TRACK_DEFAULT)
     stream_flags |= GST_STREAM_FLAG_SELECT;
+  else if (!(context->flags & GST_MATROSKA_TRACK_ENABLED))
+    stream_flags |= GST_STREAM_FLAG_UNSELECT;
+
   gst_event_set_stream_flags (stream_start, stream_flags);
   gst_pad_push_event (context->pad, stream_start);
   gst_pad_set_caps (context->pad, context->caps);