diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-25 13:18:59 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-29 18:34:30 +0100 |
commit | b326c2dcdcb7bf3011f2c1fa0c259ca94b50fd45 (patch) | |
tree | 31c9de13d897f407ecc2b53ff1b387de07d2d852 | |
parent | 5256658af5bbbee12c2ddd1d2aafe0a9d6ce4e37 (diff) | |
download | ffmpeg-b326c2dcdcb7bf3011f2c1fa0c259ca94b50fd45.tar.gz |
avcodec/mpeg4videoenc: Use stack variable for aspect_ratio_info
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/mpeg4videoenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index b3e697daf7..27e16c3b72 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -961,7 +961,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s, int vo_number, int vol_number) { - int vo_ver_id, vo_type; + int vo_ver_id, vo_type, aspect_ratio_info; if (s->max_b_frames || s->quarter_sample) { vo_ver_id = 5; @@ -986,10 +986,10 @@ static void mpeg4_encode_vol_header(MpegEncContext *s, put_bits(&s->pb, 3, 1); /* is obj layer priority */ } - s->aspect_ratio_info = ff_h263_aspect_to_info(s->avctx->sample_aspect_ratio); + aspect_ratio_info = ff_h263_aspect_to_info(s->avctx->sample_aspect_ratio); - put_bits(&s->pb, 4, s->aspect_ratio_info); /* aspect ratio info */ - if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) { + put_bits(&s->pb, 4, aspect_ratio_info); /* aspect ratio info */ + if (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); |