mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
oggdemux: Fix chain leak in push mode
In some corner cases we end up with the building chain not being properly tracked (and therefore not properly freed). Add a FIXME so it can later be fixed, but for now just fix the leak
This commit is contained in:
parent
8e867aefe0
commit
eb8bf0f162
1 changed files with 14 additions and 2 deletions
|
@ -4988,11 +4988,23 @@ gst_ogg_demux_clear_chains (GstOggDemux * ogg)
|
|||
for (i = 0; i < ogg->chains->len; i++) {
|
||||
GstOggChain *chain = g_array_index (ogg->chains, GstOggChain *, i);
|
||||
|
||||
if (chain == ogg->current_chain)
|
||||
ogg->current_chain = NULL;
|
||||
if (chain == ogg->building_chain)
|
||||
ogg->building_chain = NULL;
|
||||
gst_ogg_chain_free (chain);
|
||||
}
|
||||
ogg->chains = g_array_set_size (ogg->chains, 0);
|
||||
ogg->current_chain = NULL;
|
||||
ogg->building_chain = NULL;
|
||||
if (ogg->current_chain != NULL) {
|
||||
GST_FIXME_OBJECT (ogg, "current chain was tracked in existing chains !");
|
||||
gst_ogg_chain_free (ogg->current_chain);
|
||||
ogg->current_chain = NULL;
|
||||
}
|
||||
if (ogg->building_chain != NULL) {
|
||||
GST_FIXME_OBJECT (ogg, "building chain was tracked in existing chains !");
|
||||
gst_ogg_chain_free (ogg->building_chain);
|
||||
ogg->building_chain = NULL;
|
||||
}
|
||||
GST_CHAIN_UNLOCK (ogg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue