mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/mpeg4videoenc: Use stack variable for aspect_ratio_info
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
5256658af5
commit
b326c2dcdc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user