mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 00:51:37 +00:00
avfilter/vf_crop: prevent integer overflows when calculating SAR
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
bc98ba2d71
commit
8642ea3599
@ -206,7 +206,7 @@ static int config_input(AVFilterLink *link)
|
||||
AVRational dar = av_mul_q(link->sample_aspect_ratio,
|
||||
(AVRational){ link->w, link->h });
|
||||
av_reduce(&s->out_sar.num, &s->out_sar.den,
|
||||
dar.num * s->h, dar.den * s->w, INT_MAX);
|
||||
(int64_t)dar.num * s->h, (int64_t)dar.den * s->w, INT_MAX);
|
||||
} else
|
||||
s->out_sar = link->sample_aspect_ratio;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user