From d671197684c7c1196a4bc2250e3d20442d75d96c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 29 Aug 2019 12:11:36 +0200 Subject: [PATCH] vaapipostproc: check for filter before appending caps While ensuring the allowed sink pad caps, the filter attributes set the frame size restriction, but it is not ensured, at that moment, that the filter is already instantiaded. In order to silence the glib logs, this patch add only calls gst_vaapi_filter_append_caps() if the filter is instantiated. --- gst/vaapi/gstvaapipostproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index b1750d0..6e53dc2 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -1142,7 +1142,8 @@ ensure_allowed_sinkpad_caps (GstVaapiPostproc * postproc) if (!structure) continue; - gst_vaapi_filter_append_caps (postproc->filter, structure); + if (postproc->filter) + gst_vaapi_filter_append_caps (postproc->filter, structure); } postproc->allowed_sinkpad_caps = out_caps; -- 2.7.4