decodebin: free hidden groups at time of switching groups

hidden groups should be freed at time of switching groups to avoid memory use
from balloning up.

https://bugzilla.gnome.org/show_bug.cgi?id=755770
This commit is contained in:
Rajat Verma 2015-09-29 10:12:28 +05:30 committed by Sebastian Dröge
parent 3297b4c2b9
commit 267f4c2bad

View file

@ -4061,7 +4061,6 @@ drain_and_switch_chains (GstDecodeChain * chain, GstDecodePad * drainpad,
if (chain->next_groups) {
/* Switch to next group */
GST_DEBUG_OBJECT (dbin, "Hiding current group %p", chain->active_group);
gst_decode_chain_start_free_hidden_groups_thread (chain);
gst_decode_group_hide (chain->active_group);
chain->old_groups =
g_list_prepend (chain->old_groups, chain->active_group);
@ -4070,6 +4069,7 @@ drain_and_switch_chains (GstDecodeChain * chain, GstDecodePad * drainpad,
chain->active_group = chain->next_groups->data;
chain->next_groups =
g_list_delete_link (chain->next_groups, chain->next_groups);
gst_decode_chain_start_free_hidden_groups_thread (chain);
*switched = TRUE;
chain->drained = FALSE;
} else {