From 63da298b8445a56e8282547ea73913534fb188b8 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 27 Sep 2023 17:13:22 +0200 Subject: [PATCH] glupload: Fix always true compiler warning There was an if case that was always true. After re-reading the Khronos spec, this case is actually undefined. It is better to just always ignore the format. Part-of: --- .../gst-plugins-base/gst-libs/gst/gl/gstglupload.c | 9 +++------ 1 file changed, 3 insertions(+), 6 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 0124ba8912..4e491e993e 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c @@ -749,13 +749,10 @@ _append_drm_formats_from_video_format (GstGLContext * context, &dma_modifiers)) return; - /* No modifier info, we just consider it as linear and external_only. */ + /* No modifier info, lets warn and move on */ if (!dma_modifiers) { - if (flags | INCLUDE_EXTERNAL) { - drm_format = - gst_video_dma_drm_fourcc_to_string (fourcc, DRM_FORMAT_MOD_LINEAR); - g_ptr_array_add (drm_formats, drm_format); - } + GST_WARNING_OBJECT (context, "Undefined modifiers list for %" + GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); return; }