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.
This commit is contained in:
Víctor Manuel Jáquez Leal 2019-08-29 12:11:36 +02:00
parent 9fe6b621a2
commit d671197684

View file

@ -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;