From a3c45f2848d3988324f6e6b9788534e6eb5e7e68 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 25 Sep 2020 21:06:44 +0900 Subject: [PATCH] glupload: Fix for wrongly recognized reconfigure condition gst_gl_upload_transform_caps() method might return non-fixed caps (texture-target for example) but priv->out_caps is fixed one so the former (non-fixed caps) is superset. Part-of: --- subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c | 2 +- subprojects/gst-plugins-base/tests/check/libs/gstglupload.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c index a42b831743..a091760d1e 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c @@ -3332,7 +3332,7 @@ restart: last_method != NULL ? last_method->name : "None", upload->priv->method->name, caps, upload->priv->out_caps); - if (caps == NULL || !gst_caps_is_subset (caps, upload->priv->out_caps)) { + if (caps == NULL || !gst_caps_is_subset (upload->priv->out_caps, caps)) { gst_buffer_replace (&outbuf, NULL); ret = GST_GL_UPLOAD_RECONFIGURE; } diff --git a/subprojects/gst-plugins-base/tests/check/libs/gstglupload.c b/subprojects/gst-plugins-base/tests/check/libs/gstglupload.c index c9b02f0eb5..57452817a9 100644 --- a/subprojects/gst-plugins-base/tests/check/libs/gstglupload.c +++ b/subprojects/gst-plugins-base/tests/check/libs/gstglupload.c @@ -283,7 +283,7 @@ GST_START_TEST (test_upload_data) in_caps = gst_caps_from_string ("video/x-raw,format=RGBA," "width=10,height=10"); out_caps = gst_caps_from_string ("video/x-raw(memory:GLMemory)," - "format=RGBA,width=10,height=10"); + "format=RGBA,width=10,height=10,texture-target=2D"); gst_gl_upload_set_caps (upload, in_caps, out_caps);