vaapipostproc: lock ensure_filter with postproc_lock
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 8 Dec 2017 13:46:02 +0000 (14:46 +0100)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 12 Jan 2018 18:10:35 +0000 (19:10 +0100)
commitaed4088967eec97de81a1c914f87fdbae09a19e8
tree18a6a1b56d0c1c7739f684304eee5d84556f4e7d
parent089b8982e9816def693890a96882f370ea287f47
vaapipostproc: lock ensure_filter with postproc_lock

gst_vaapipostproc_ensure_filter might free the allowed_srcpad_caps
and allowed_sinkpad_caps. This can race with copying these caps in
gst_vaapipostproc_transform_caps and lead to segfaults.

The gst_vaapipostproc_transform_caps function already locks
postproc_lock before copying the caps. Make sure that calls to
gst_vaapipostproc_ensure_filter also acquire this lock.

https://bugzilla.gnome.org/show_bug.cgi?id=791404
gst/vaapi/gstvaapipostproc.c