]> git.sesse.net Git - ffmpeg/commitdiff
kmsgrab: Do not require the modifier to stay constant.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 13 Nov 2020 23:15:47 +0000 (00:15 +0100)
committerMark Thompson <sw@jkqxz.net>
Wed, 13 Jan 2021 23:08:02 +0000 (23:08 +0000)
As we get a new set of objects each frame anyway, we
do not gain anything by keeping the modifier constant.

This helps with capturing when switching your setup a
bit, e.g. from ingame to desktop or from X11 to wayland.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
libavdevice/kmsgrab.c

index b740a3217135ce59c2a92cac1c0d0d9d2cf0b440..94e32b9cae464b9ac302c9751ddb3e1aaae30d3d 100644 (file)
@@ -176,13 +176,6 @@ static int kmsgrab_get_fb2(AVFormatContext *avctx,
         err = AVERROR(EIO);
         goto fail;
     }
-    if (fb->modifier != ctx->drm_format_modifier) {
-        av_log(avctx, AV_LOG_ERROR, "Plane %"PRIu32" framebuffer "
-               "format modifier changed: now %"PRIx64".\n",
-               ctx->plane_id, fb->modifier);
-        err = AVERROR(EIO);
-        goto fail;
-    }
     if (fb->width != ctx->width || fb->height != ctx->height) {
         av_log(avctx, AV_LOG_ERROR, "Plane %"PRIu32" framebuffer "
                "dimensions changed: now %"PRIu32"x%"PRIu32".\n",