diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2019-01-09 15:03:19 +0800 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-02 12:08:36 +0100 |
commit | 9c3a293251758de2fe3cc1d681763301fa2bc5be (patch) | |
tree | 5892060b4565491c2b5437433fcd0524c3c9a8de | |
parent | acc536f110022bc7354acc607e4c541b5fc1e528 (diff) | |
download | gstreamer-plugins-bad-9c3a293251758de2fe3cc1d681763301fa2bc5be.tar.gz |
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)
[1]: https://software.intel.com/en-us/node/628429#MFXCloneSession
-rw-r--r-- | sys/msdk/gstmsdkcontext.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/msdk/gstmsdkcontext.c b/sys/msdk/gstmsdkcontext.c index b365e22c0..942578b9c 100644 --- a/sys/msdk/gstmsdkcontext.c +++ b/sys/msdk/gstmsdkcontext.c @@ -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; |