vaapipostproc: check ANY caps at transform_caps()

When transforming downstream caps we should check for ANY caps from peer pad,
otherwise we get a segmentation fault.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=759893
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-01-14 17:36:24 +01:00
parent 8f77d54103
commit b8da44bdea

View file

@ -1100,7 +1100,7 @@ gst_vaapipostproc_transform_caps_impl (GstBaseTransform * trans,
peer_caps =
gst_pad_peer_query_caps (GST_BASE_TRANSFORM_SRC_PAD (trans),
postproc->allowed_srcpad_caps);
if (gst_caps_is_empty (peer_caps))
if (gst_caps_is_any (peer_caps) || gst_caps_is_empty (peer_caps))
return peer_caps;
if (!gst_caps_is_fixed (peer_caps))
peer_caps = gst_caps_fixate (peer_caps);