mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
msdk: decrease the reference count of object
Otherwise there are reference leaks if failed to clone or join a mfx session
This commit is contained in:
parent
43e5eaeda1
commit
801189c02f
1 changed files with 2 additions and 0 deletions
|
@ -283,12 +283,14 @@ gst_msdk_context_new_with_parent (GstMsdkContext * parent)
|
|||
status = MFXCloneSession (parent_priv->session, &priv->session);
|
||||
if (status != MFX_ERR_NONE) {
|
||||
GST_ERROR ("Failed to clone mfx session");
|
||||
g_object_unref (obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
status = MFXJoinSession (parent_priv->session, priv->session);
|
||||
if (status != MFX_ERR_NONE) {
|
||||
GST_ERROR ("Failed to join mfx session");
|
||||
g_object_unref (obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue