From: Matthew Waters Date: Fri, 10 Apr 2020 04:05:08 +0000 (+1000) Subject: glvideomixer: intersect with template caps when updating X-Git-Tag: 1.19.3~511^2~674 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebf8198a97b432919386c17c7e08beb6c7708bc2;p=platform%2Fupstream%2Fgstreamer.git glvideomixer: intersect with template caps when updating Downstream may provide extra things when we ask it for caps that we may need to remove. Fixes the following pipeline warning: gltestsrc ! glvideomixerelement ! glimagesinkelement ** (gst-launch-1.0:908581): WARNING **: 13:53:28.518: glvideomixer0: update_src_caps returned caps which are not a real subset of the filter caps --- diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c index 1c3a468..551e206 100644 --- a/ext/gl/gstglvideomixer.c +++ b/ext/gl/gstglvideomixer.c @@ -1038,7 +1038,7 @@ _mixer_pad_get_output_size (GstGLVideoMixer * mix, static GstCaps * _update_caps (GstVideoAggregator * vagg, GstCaps * caps) { - GstCaps *ret; + GstCaps *template_caps, *ret; GList *l; GST_OBJECT_LOCK (vagg); @@ -1063,7 +1063,8 @@ _update_caps (GstVideoAggregator * vagg, GstCaps * caps) GST_OBJECT_UNLOCK (vagg); - ret = gst_caps_ref (caps); + template_caps = gst_pad_get_pad_template_caps (GST_AGGREGATOR_SRC_PAD (vagg)); + ret = gst_caps_intersect (caps, template_caps); return ret; }