diff options
-rw-r--r-- | video/out/vo_xv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index e02ea2d046..1e7ae7c4c5 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -577,6 +577,15 @@ static bool allocate_xvimage(struct vo *vo, int foo) return false; XSync(x11->display, False); } + + if ((ctx->xvimage[foo]->width != aligned_w) || + (ctx->xvimage[foo]->height != ctx->image_height)) { + MP_ERR(vo, "Got XvImage with incorrect size: %ux%u (expected %ux%u)\n", + ctx->xvimage[foo]->width, ctx->xvimage[foo]->height, + aligned_w, ctx->image_height); + return false; + } + struct mp_image img = get_xv_buffer(vo, foo); img.w = aligned_w; mp_image_clear(&img, 0, 0, img.w, img.h); |