tsdemux: Don't dereference NULL if flushed before a program was selected
authorSebastian Dröge <sebastian@centricular.com>
Fri, 28 Mar 2014 16:24:46 +0000 (17:24 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 29 Mar 2014 09:33:45 +0000 (10:33 +0100)
gst/mpegtsdemux/tsdemux.c

index b2ab60f..0773741 100644 (file)
@@ -1249,6 +1249,9 @@ gst_ts_demux_stream_flush (TSDemuxStream * stream)
 static void
 gst_ts_demux_flush_streams (GstTSDemux * demux)
 {
+  if (!demux->program)
+    return;
+
   g_list_foreach (demux->program->stream_list,
       (GFunc) gst_ts_demux_stream_flush, NULL);
 }