summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index c899e53206..ba9b81d98e 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -565,7 +565,10 @@ static struct mp_image *get_surface_hwdec(struct sh_video *sh, AVFrame *pic)
if (!IMGFMT_IS_HWACCEL(imgfmt))
return NULL;
- // frame->width/height lie. Using them breaks with non-mod 16 video.
+ // Using frame->width/height is bad. For non-mod 16 video (which would
+ // require alignment of frame sizes) we want the decoded size, not the
+ // aligned size. At least vdpau needs this: the video mixer is created
+ // with decoded size, and the video surfaces must have matching size.
int w = ctx->avctx->width;
int h = ctx->avctx->height;