tsdemux: fix potential crash dereferencing NULL program pointer

https://bugzilla.gnome.org/show_bug.cgi?id=686358
This commit is contained in:
Andoni Morales Alastruey 2012-10-18 01:47:57 +02:00 committed by Tim-Philipp Müller
parent a931d5ced0
commit f768dfd925

View file

@ -1499,6 +1499,12 @@ gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream)
goto beach;
}
if (G_UNLIKELY (demux->program == NULL)) {
GST_LOG_OBJECT (demux, "No program");
g_free (stream->data);
goto beach;
}
if (G_UNLIKELY (stream->need_newsegment))
calculate_and_push_newsegment (demux, stream);