[Win32] Fix window size when aspect ratio is < 0 (#15941)

This commit is contained in:
Bobby Smith 2023-11-22 19:14:48 +01:00 committed by GitHub
parent 39a44414ea
commit 3c25f19d80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -932,7 +932,7 @@ static void win32_get_av_info_geometry(unsigned *width, unsigned *height)
if (!video_st || runloop_st->flags & RUNLOOP_FLAG_FASTMOTION)
return;
if (video_st->av_info.geometry.aspect_ratio)
if (video_st->av_info.geometry.aspect_ratio > 0)
*width = roundf(
video_st->av_info.geometry.base_height
* video_st->av_info.geometry.aspect_ratio);