mirror of
https://github.com/mpv-player/mpv
synced 2025-01-13 02:16:40 +00:00
vd_lavc: fix comment, document hwdec video frame size trickiness
About this issue, it would be better if the surfaces could be allocated with the real size, and the vdpau video mixer could be created with that size as well. That would be a bit hard, because the real surface size had to be communicated to vdpau. So I'm going with this solution. vaapi seems to be fine with either surface size, so there's hopefully no problem.
This commit is contained in:
parent
0da9638576
commit
be2f2ff033
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user