From a5dcce98aa0c77cf6c31aeb7e2cb0c12abeec1ba Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 15 Jun 2015 16:08:10 +0200 Subject: [PATCH] oggdemux: set building_chain to NULL when deactivating chain The chain is about to be invalidated so we shouldn't keep it around. Prevent a double free crash when the demuxer is being finalized. https://bugzilla.gnome.org/show_bug.cgi?id=751000 --- ext/ogg/gstoggdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 34f472c7d1..b758934914 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -2775,6 +2775,8 @@ gst_ogg_demux_deactivate_current_chain (GstOggDemux * ogg) /* if we cannot seek back to the chain, we can destroy the chain * completely */ if (!ogg->pullmode) { + if (ogg->building_chain == chain) + ogg->building_chain = NULL; gst_ogg_chain_free (chain); }