From 6d73ca8da2bc0b33262307c0fd1d5e64dc819655 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 29 Jun 2016 16:42:18 +1000 Subject: [PATCH] vaapipostproc: don't require a vaapi display for all caps queries This delays the requirement of having a GstVaapiDisplay until later https://bugzilla.gnome.org/show_bug.cgi?id=768161 --- gst/vaapi/gstvaapipostproc.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index df654bcd0f..2a2f5219d2 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -920,16 +920,21 @@ ensure_allowed_sinkpad_caps (GstVaapiPostproc * postproc) } /* Append raw video caps */ - if (gst_vaapipostproc_ensure_display (postproc)) { + if (GST_VAAPI_PLUGIN_BASE (postproc)->display) { raw_caps = gst_vaapi_plugin_base_get_allowed_raw_caps (GST_VAAPI_PLUGIN_BASE (postproc)); - if (raw_caps) { - out_caps = gst_caps_make_writable (out_caps); - gst_caps_append (out_caps, gst_caps_copy (raw_caps)); - } else { - GST_WARNING_OBJECT (postproc, "failed to create YUV sink caps"); - } + } else { + raw_caps = + gst_caps_from_string (GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ", " + GST_CAPS_INTERLACED_MODES); + } + + if (raw_caps) { + out_caps = gst_caps_make_writable (out_caps); + gst_caps_append (out_caps, gst_caps_copy (raw_caps)); + } else { + GST_WARNING_OBJECT (postproc, "failed to create YUV sink caps"); } postproc->allowed_sinkpad_caps = out_caps;