mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
mp_image: reject invalid display aspect ratio
Having any of these set to 0 makes no sense. I think some code might still be using 0/0 aspect ratio to signal unset aspect ratio, but I didn't find it. If there is still code like this, it should be fixed instead. Fixes #1467.
This commit is contained in:
parent
8c54b56f43
commit
faf561c4ec
@ -496,7 +496,7 @@ bool mp_image_params_valid(const struct mp_image_params *p)
|
||||
if (p->w < 0 || p->h < 0 || (p->w + 128LL) * (p->h + 128LL) >= INT_MAX / 8)
|
||||
return false;
|
||||
|
||||
if (p->d_w < 0 || p->d_h < 0)
|
||||
if (p->d_w <= 0 || p->d_h <= 0)
|
||||
return false;
|
||||
|
||||
if (p->rotate < 0 || p->rotate >= 360)
|
||||
|
Loading…
Reference in New Issue
Block a user