mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 09:57:34 +00:00
aspect: don't allow scaled_src_size be 0
It doesn't make sense to have zero here and it breaks, logic below. Width was still campled to 1, but with broken offset. This fixes things like video-scale-x=0
This commit is contained in:
parent
1fa6669bc0
commit
56ec3ea9f6
@ -83,6 +83,7 @@ static void src_dst_split_scaling(int src_size, int dst_size,
|
|||||||
int *osd_margin_a, int *osd_margin_b)
|
int *osd_margin_a, int *osd_margin_b)
|
||||||
{
|
{
|
||||||
scaled_src_size *= powf(2, zoom) * scale;
|
scaled_src_size *= powf(2, zoom) * scale;
|
||||||
|
scaled_src_size = MPMAX(scaled_src_size, 1);
|
||||||
align = (align + 1) / 2;
|
align = (align + 1) / 2;
|
||||||
|
|
||||||
*src_start = 0;
|
*src_start = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user