diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-25 13:01:58 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-29 18:34:30 +0100 |
commit | f05ba7b169f95a980dac8193a1065737fb9d3435 (patch) | |
tree | b3c83e0d26a08444ceb5d7ff46b2e0898c2fc6d8 /libavcodec/mpeg12enc.c | |
parent | 769703613acc6af335c0d0a3eee4b0eaf59caed4 (diff) | |
download | ffmpeg-f05ba7b169f95a980dac8193a1065737fb9d3435.tar.gz |
avcodec/mpeg12enc: Use stack variable for aspect_ratio_info
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpeg12enc.c')
-rw-r--r-- | libavcodec/mpeg12enc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index e28aa809d2..a19100a42d 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -273,6 +273,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) if (s->current_picture.f->key_frame) { AVRational framerate = ff_mpeg12_frame_rate_tab[s->frame_rate_index]; + int aspect_ratio_info; /* MPEG-1 header repeated every GOP */ put_header(s, SEQ_START_CODE); @@ -291,11 +292,11 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) if (error - 2 <= best_aspect_error) { best_aspect_error = error; - s->aspect_ratio_info = i; + aspect_ratio_info = i; } } - put_bits(&s->pb, 4, s->aspect_ratio_info); + put_bits(&s->pb, 4, aspect_ratio_info); put_bits(&s->pb, 4, s->frame_rate_index); if (s->avctx->rc_max_rate) { |