diff mbox series

[FFmpeg-devel,03/21] avcodec/mpeg4videoenc: Use stack variable for vo_type

Message ID AM7PR03MB6660CF32E4CD381276AE6E7E8F5F9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 49627b2f2ac7d930724c4125bb656a5879721cea
Headers show
Series [FFmpeg-devel,01/21] avcodec/h263: Remove declaration for inexistent function | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 25, 2022, 5:41 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpeg4videoenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 8871d83281..b3e697daf7 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -961,14 +961,14 @@  static void mpeg4_encode_vol_header(MpegEncContext *s,
                                     int vo_number,
                                     int vol_number)
 {
-    int vo_ver_id;
+    int vo_ver_id, vo_type;
 
     if (s->max_b_frames || s->quarter_sample) {
         vo_ver_id  = 5;
-        s->vo_type = ADV_SIMPLE_VO_TYPE;
+        vo_type = ADV_SIMPLE_VO_TYPE;
     } else {
         vo_ver_id  = 1;
-        s->vo_type = SIMPLE_VO_TYPE;
+        vo_type = SIMPLE_VO_TYPE;
     }
 
     put_bits(&s->pb, 16, 0);
@@ -977,7 +977,7 @@  static void mpeg4_encode_vol_header(MpegEncContext *s,
     put_bits(&s->pb, 16, 0x120 + vol_number);       /* video obj layer */
 
     put_bits(&s->pb, 1, 0);             /* random access vol */
-    put_bits(&s->pb, 8, s->vo_type);    /* video obj type indication */
+    put_bits(&s->pb, 8, vo_type);       /* video obj type indication */
     if (s->workaround_bugs & FF_BUG_MS) {
         put_bits(&s->pb, 1, 0);         /* is obj layer id= no */
     } else {