Commit 801189c0 authored by Haihao Xiang's avatar Haihao Xiang Committed by Víctor Manuel Jáquez Leal

msdk: decrease the reference count of object

Otherwise there are reference leaks if failed to clone or join a
mfx session
parent 43e5eaed
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment