mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
decodebin3: allow to call "dispose" multiple times
https://docs.gtk.org/gobject/concepts.html#reference-counts-and-cycles Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3135>
This commit is contained in:
parent
b618ff3369
commit
89fc20931b
1 changed files with 19 additions and 4 deletions
|
@ -657,19 +657,34 @@ gst_decodebin3_dispose (GObject * object)
|
||||||
GstDecodebin3 *dbin = (GstDecodebin3 *) object;
|
GstDecodebin3 *dbin = (GstDecodebin3 *) object;
|
||||||
GList *walk, *next;
|
GList *walk, *next;
|
||||||
|
|
||||||
if (dbin->factories)
|
if (dbin->factories) {
|
||||||
gst_plugin_feature_list_free (dbin->factories);
|
gst_plugin_feature_list_free (dbin->factories);
|
||||||
if (dbin->decoder_factories)
|
dbin->factories = NULL;
|
||||||
|
}
|
||||||
|
if (dbin->decoder_factories) {
|
||||||
g_list_free (dbin->decoder_factories);
|
g_list_free (dbin->decoder_factories);
|
||||||
if (dbin->decodable_factories)
|
dbin->decoder_factories = NULL;
|
||||||
|
}
|
||||||
|
if (dbin->decodable_factories) {
|
||||||
g_list_free (dbin->decodable_factories);
|
g_list_free (dbin->decodable_factories);
|
||||||
|
dbin->decodable_factories = NULL;
|
||||||
|
}
|
||||||
g_list_free_full (dbin->requested_selection, g_free);
|
g_list_free_full (dbin->requested_selection, g_free);
|
||||||
g_list_free_full (dbin->active_selection, g_free);
|
g_list_free_full (dbin->active_selection, g_free);
|
||||||
g_list_free (dbin->to_activate);
|
g_list_free (dbin->to_activate);
|
||||||
g_list_free (dbin->pending_select_streams);
|
g_list_free (dbin->pending_select_streams);
|
||||||
|
|
||||||
|
dbin->requested_selection = NULL;
|
||||||
|
dbin->active_selection = NULL;
|
||||||
|
dbin->to_activate = NULL;
|
||||||
|
dbin->pending_select_streams = NULL;
|
||||||
|
|
||||||
g_clear_object (&dbin->collection);
|
g_clear_object (&dbin->collection);
|
||||||
|
|
||||||
|
if (dbin->main_input) {
|
||||||
free_input (dbin, dbin->main_input);
|
free_input (dbin, dbin->main_input);
|
||||||
|
dbin->main_input = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
for (walk = dbin->other_inputs; walk; walk = next) {
|
for (walk = dbin->other_inputs; walk; walk = next) {
|
||||||
DecodebinInput *input = walk->data;
|
DecodebinInput *input = walk->data;
|
||||||
|
|
Loading…
Reference in a new issue