mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
mpeg4videoenc: ensure SAR is within the supported range
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b5da7d4c1a
commit
30c8573dc7
@ -969,6 +969,8 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n
|
||||
|
||||
put_bits(&s->pb, 4, s->aspect_ratio_info);/* aspect ratio info */
|
||||
if (s->aspect_ratio_info == FF_ASPECT_EXTENDED){
|
||||
av_reduce(&s->avctx->sample_aspect_ratio.num, &s->avctx->sample_aspect_ratio.den,
|
||||
s->avctx->sample_aspect_ratio.num, s->avctx->sample_aspect_ratio.den, 255);
|
||||
put_bits(&s->pb, 8, s->avctx->sample_aspect_ratio.num);
|
||||
put_bits(&s->pb, 8, s->avctx->sample_aspect_ratio.den);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user