From c1de41b8414fe72c7774255520d15f3ba5836208 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 14 Nov 2018 11:34:20 +0100 Subject: [PATCH] vaapipostproc: add some missing locking gst_vaapi_plugin_base_close() removed the raw caps that are used indirectly in gst_vaapipostproc_transform_caps(). The usage is already protected by the mutex. This is needed when the pipeline is stopped during startup. --- gst/vaapi/gstvaapipostproc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index 7698aea978..4577454b5d 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -318,6 +318,7 @@ gst_vaapipostproc_stop (GstBaseTransform * trans) { GstVaapiPostproc *const postproc = GST_VAAPIPOSTPROC (trans); + g_mutex_lock (&postproc->postproc_lock); ds_reset (&postproc->deinterlace_state); gst_vaapi_plugin_base_close (GST_VAAPI_PLUGIN_BASE (postproc)); @@ -325,6 +326,7 @@ gst_vaapipostproc_stop (GstBaseTransform * trans) gst_video_info_init (&postproc->sinkpad_info); gst_video_info_init (&postproc->srcpad_info); gst_video_info_init (&postproc->filter_pool_info); + g_mutex_unlock (&postproc->postproc_lock); return TRUE; }