adaptivedemux2: Fix a small race on shutdown
authorJan Schmidt <jan@centricular.com>
Thu, 4 Aug 2022 13:54:27 +0000 (23:54 +1000)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 5 Aug 2022 22:36:49 +0000 (23:36 +0100)
commitb7e662f40081b24d7a95190bc63710f979cc9287
tree4af4ac644134411352f7ca576f2b37fc7bbab81a
parentcf64c9f58847a1da8bf54d7c2f4d18dcd87e1f38
adaptivedemux2: Fix a small race on shutdown

Make sure gst_adaptive_demux_loop_cancel_call()
never tries to operate on an invalidated main context. Make
sure to clear the main context pointer while holding the lock,
and to check it in gst_adaptive_demux_loop_cancel_call()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2847>
subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemuxutils.c