Commit 9c3a2932 authored by Haihao Xiang's avatar Haihao Xiang Committed by Tim-Philipp Müller

msdk: needn't call MFXJoinSession after MFXCloneSession

According to the MSDK documation[1], MFXCloneSession is a light-weight
equivalent of MFXJoinSession after MFXInit, so MFXJoinSession call isn't
needed in the msdk plugin, otherwise the cloned session is joined to the
parent session twice, and we will get a MFX error when closing the
parent session

example pipeline:

gst-launch-1.0 videotestsrc num-buffers=100 ! \
video/x-raw,format=NV12,width=352,height=288 ! msdkh264enc ! msdkh264dec ! \
msdkh264enc ! fakesink

Error message:

0:00:00.211948518 21733 0x5586ee741c60 ERROR                   msdk
msdk.c:148:msdk_close_session: Close failed (undefined behavior)

parent acc536f1
......@@ -290,12 +290,6 @@ gst_msdk_context_new_with_parent (GstMsdkContext * parent)
return NULL;
status = MFXJoinSession (parent_priv->session, priv->session);
if (status != MFX_ERR_NONE) {
GST_ERROR ("Failed to join mfx session");
return NULL;
priv->is_joined = TRUE;
priv->hardware = parent_priv->hardware;
priv->job_type = parent_priv->job_type;
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