From d65d8657e64a387a87cdeb96e1b64fb640281166 Mon Sep 17 00:00:00 2001 From: Nicolas Huet Date: Thu, 12 Nov 2015 16:35:12 +0100 Subject: [PATCH] mpegtsdemux: fix section_data leak If packet->payload_unit_start_indicator is true and pointer 0, there is no discontinuity check. Therefore there could be a previous section not complete that need to be cleared. https://bugzilla.gnome.org/show_bug.cgi?id=758010 --- gst/mpegtsdemux/mpegtspacketizer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c index 1cdb9e993e..ce417c3352 100644 --- a/gst/mpegtsdemux/mpegtspacketizer.c +++ b/gst/mpegtsdemux/mpegtspacketizer.c @@ -228,8 +228,6 @@ static void mpegts_packetizer_stream_free (MpegTSPacketizerStream * stream) { mpegts_packetizer_clear_section (stream); - if (stream->section_data) - g_free (stream->section_data); g_slist_foreach (stream->subtables, (GFunc) mpegts_packetizer_stream_subtable_free, NULL); g_slist_free (stream->subtables); @@ -984,6 +982,7 @@ mpegts_packetizer_push_section (MpegTSPacketizer2 * packetizer, GST_LOG ("PID 0x%04x PUSI and pointer == 0, skipping straight to section_start parsing", packet->pid); + mpegts_packetizer_clear_section (stream); goto section_start; } }