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
This commit is contained in:
Guillaume Desmottes 2015-06-15 16:08:10 +02:00 committed by Sebastian Dröge
parent eec791a37f
commit a5dcce98aa

View file

@ -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 /* if we cannot seek back to the chain, we can destroy the chain
* completely */ * completely */
if (!ogg->pullmode) { if (!ogg->pullmode) {
if (ogg->building_chain == chain)
ogg->building_chain = NULL;
gst_ogg_chain_free (chain); gst_ogg_chain_free (chain);
} }