From e074eff5ef1f37e3d1da3c4953ef6cdeb5adceaf Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 31 Oct 2018 18:30:14 +0000 Subject: [PATCH] glupload: Only renegotiate if the caps are incompatible There is new code that ensures that we renegotiate after an uploader transition if the negotiated caps have changed. The problem is that the raw uploader will not really try and fixate the input caps, but instead of return a subset with the only the supported target texture. This had two effect, raw uploads was always done renegotiated once and the raw upload unit test was now failing as it didn't expect a renegotiation. As it's a valid check, simply relax the gst_caps_is_equal() check and use a gst_caps_is_subset() instead. https://bugzilla.gnome.org/show_bug.cgi?id=783521 --- gst-libs/gst/gl/gstglupload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index e32f684..9aa2576 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -2015,7 +2015,7 @@ restart: if (last_impl != upload->priv->method_impl) { GstCaps *caps = gst_gl_upload_transform_caps (upload, upload->context, GST_PAD_SINK, upload->priv->in_caps, NULL); - if (!gst_caps_is_equal (upload->priv->out_caps, caps)) { + if (!gst_caps_is_subset (caps, upload->priv->out_caps)) { gst_buffer_replace (&outbuf, NULL); ret = GST_GL_UPLOAD_RECONFIGURE; } -- 2.7.4