msdk: make sure child context is destroyed first
authorHaihao Xiang <haihao.xiang@intel.com>
Sat, 17 Jul 2021 16:51:04 +0000 (00:51 +0800)
committerHaihao Xiang <haihao.xiang@intel.com>
Wed, 4 Aug 2021 04:50:08 +0000 (04:50 +0000)
commitc7be05cc38d283b2e31e1881222ede5387100aed
treedfd734761af5d28898aabc93e16fde65784f8144
parenta096207f8531742bbe7c83771524fdbf596bcec1
msdk: make sure child context is destroyed first

The parent context shares some resources with child context, so the
child context should be destroyed first, otherwise the command below
will trigger a segmentation fault

$> gst-launch-1.0 videotestsrc num-buffers=100 ! msdkh264enc ! \
msdkh264dec ! fakesink videotestsrc num-buffers=50 ! \
msdkh264enc ! msdkh264dec ! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2435>
sys/msdk/gstmsdkcontext.c