diff mbox series

[FFmpeg-devel,v2,2/3] kmsgrab: Do not require the modifier to stay constant.

Message ID 20201113231548.869559-2-bas@basnieuwenhuizen.nl
State New
Headers show
Series [FFmpeg-devel,v2,1/3] kmsgrab: Use invalid modifier if modifiers weren't used.
Related show


Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Bas Nieuwenhuizen Nov. 13, 2020, 11:15 p.m. UTC
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.
 libavdevice/kmsgrab.c | 7 -------
 1 file changed, 7 deletions(-)
diff mbox series


diff --git a/libavdevice/kmsgrab.c b/libavdevice/kmsgrab.c
index b740a32171..94e32b9cae 100644
--- a/libavdevice/kmsgrab.c
+++ b/libavdevice/kmsgrab.c
@@ -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",