mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
msdk: Fix session close failure
In the case of multi-channels transcoding, a context with child sesseion can be parent for others, so we need to check if the msdkcontext has any child session in the list to avoid session leaks. Otherwise, we will see the failure of closing a parent session because one of its child's child session not released. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6259>
This commit is contained in:
parent
ef5b8dc96a
commit
41c52f5739
1 changed files with 4 additions and 0 deletions
|
@ -376,6 +376,10 @@ gst_msdk_context_finalize (GObject * obj)
|
|||
|
||||
/* child sessions will be closed when the parent session is closed */
|
||||
if (priv->parent_context) {
|
||||
/* A context with parent_context can also be a parent to others,
|
||||
* and we need to check its child_session_list */
|
||||
if (priv->child_session_list)
|
||||
g_list_free_full (priv->child_session_list, release_child_session);
|
||||
gst_object_unref (priv->parent_context);
|
||||
goto done;
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue