mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
decodebin3: Tidy-up dispose function
Protect code with mutexes Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5607>
This commit is contained in:
parent
f0e1b4f415
commit
ca18e48882
1 changed files with 7 additions and 1 deletions
|
@ -702,6 +702,7 @@ gst_decodebin3_dispose (GObject * object)
|
|||
|
||||
gst_decodebin3_reset (dbin);
|
||||
|
||||
g_mutex_lock (&dbin->factories_lock);
|
||||
if (dbin->factories) {
|
||||
gst_plugin_feature_list_free (dbin->factories);
|
||||
dbin->factories = NULL;
|
||||
|
@ -714,8 +715,13 @@ gst_decodebin3_dispose (GObject * object)
|
|||
g_list_free (dbin->decodable_factories);
|
||||
dbin->decodable_factories = NULL;
|
||||
}
|
||||
g_mutex_unlock (&dbin->factories_lock);
|
||||
|
||||
gst_clear_object (&dbin->collection);
|
||||
SELECTION_LOCK (dbin);
|
||||
if (dbin->collection) {
|
||||
gst_clear_object (&dbin->collection);
|
||||
}
|
||||
SELECTION_UNLOCK (dbin);
|
||||
|
||||
INPUT_LOCK (dbin);
|
||||
if (dbin->main_input) {
|
||||
|
|
Loading…
Reference in a new issue