mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #11185] fix: make sure the dimension is divisible by two for zscale #12777
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/jellyfin/jellyfin/pull/11185
State: closed
Merged: Yes
zscale filter has an assertion that image dimensions must be divisible by subsampling factor, and for most yuv formats, this means the dimension has to be divisible by two. Our current logic recalculating dimensions may yield an odd number, especially for anamorphic videos, which fails the thumbnail generation.
Changes
scale=round(iw*dar/2)*2:round(ih/2)*2to generate an always even dimension. This would cause a side effect where 1x1 inputs being upscaled to 2x2, but this case is very unlikely.Issues
Fixes #11183