msdk: needn't call MFXJoinSession after MFXCloneSession
authorHaihao Xiang <haihao.xiang@intel.com>
Wed, 9 Jan 2019 07:03:19 +0000 (15:03 +0800)
committerHaihao Xiang <haihao.xiang@intel.com>
Wed, 9 Jan 2019 07:52:27 +0000 (15:52 +0800)
commitd7ad665d1c3261a49a6ad59a1fada2f6adf9a1df
treef46586172f998c10d415c7410f8086afc293e394
parent6c887f982e94d503abbed0efb30e65342e1dcb3a
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
sys/msdk/gstmsdkcontext.c