[FFmpeg-cvslog] avcodec/mpeg4videoenc: Use smaller scope for variable

Andreas Rheinhardt git at videolan.org
Mon May 26 06:25:05 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun May 18 21:22:04 2025 +0200| [6af1bcb180340c917429d523cea78010ec822c3e] | committer: Andreas Rheinhardt

avcodec/mpeg4videoenc: Use smaller scope for variable

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6af1bcb180340c917429d523cea78010ec822c3e
---

 libavcodec/mpeg4videoenc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 10c78353cb..d3828760ec 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -238,11 +238,10 @@ static inline int decide_ac_pred(MPVEncContext *const s, int16_t block[6][64],
  */
 void ff_clean_mpeg4_qscales(MPVEncContext *const s)
 {
-    int8_t *const qscale_table = s->c.cur_pic.qscale_table;
-
     ff_clean_h263_qscales(s);
 
     if (s->c.pict_type == AV_PICTURE_TYPE_B) {
+        int8_t *const qscale_table = s->c.cur_pic.qscale_table;
         int odd = 0;
         /* ok, come on, this isn't funny anymore, there's more code for
          * handling this MPEG-4 mess than for the actual adaptive quantization */



More information about the ffmpeg-cvslog mailing list