From b19a5ea1f3a3d928e36a1d626fb0f39614cfda99 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 19 Aug 2011 13:32:14 +0100 Subject: [PATCH] tsdemux: do not keep a dangling pointer When removing the current program, it will get freed by the hash table removal callback, so ensure we clear our pointer to it. Fixes a crash later on in gst_ts_demux_push trying to access it. https://bugzilla.gnome.org/show_bug.cgi?id=656927 --- gst/mpegtsdemux/tsdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 1b96c25f32..00887131f8 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -1590,6 +1590,7 @@ find_timestamps (MpegTSBase * base, guint64 initoff, guint64 * offset) gst_structure_free (base->pat); base->pat = NULL; mpegts_base_remove_program (base, demux->current_program_number); + demux->program = NULL; /* Find end position */ if (G_UNLIKELY (!gst_pad_query_peer_duration (base->sinkpad, &format, @@ -1648,6 +1649,7 @@ beach: base->pat = NULL; } mpegts_base_remove_program (base, demux->current_program_number); + demux->program = NULL; return ret; }