From 3ee867289762804d24557e80c3834b371507abb6 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 23 Apr 2021 16:42:26 +0900 Subject: [PATCH] framepositioner: Allow ANY caps features framepositioner will not touch raw video data and therefore should be able to accept ANY caps features Part-of: --- ges/gstframepositioner.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ges/gstframepositioner.c b/ges/gstframepositioner.c index dc8b7efcd9..23a61e1ee6 100644 --- a/ges/gstframepositioner.c +++ b/ges/gstframepositioner.c @@ -68,14 +68,14 @@ static GstStaticPadTemplate gst_frame_positioner_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-raw") + GST_STATIC_CAPS ("video/x-raw(ANY)") ); static GstStaticPadTemplate gst_frame_positioner_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-raw") + GST_STATIC_CAPS ("video/x-raw(ANY)") ); G_DEFINE_TYPE (GstFramePositioner, gst_frame_positioner, @@ -262,13 +262,12 @@ gst_frame_positioner_update_properties (GstFramePositioner * pos, if (pos->capsfilter == NULL) return; + caps = gst_caps_from_string ("video/x-raw(ANY)"); + if (pos->track_width && pos->track_height && (!track_mixing || !pos->scale_in_compositor)) { - caps = - gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, + gst_caps_set_simple (caps, "width", G_TYPE_INT, pos->track_width, "height", G_TYPE_INT, pos->track_height, NULL); - } else { - caps = gst_caps_new_empty_simple ("video/x-raw"); } if (pos->fps_n != -1)