[FFmpeg-cvslog] avcodec/mjpegdec: Remove redundant initialization

Andreas Rheinhardt git at videolan.org
Fri Oct 9 02:44:55 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Oct  8 20:08:12 2020 +0200| [dc3f177b8f1913ed05401b3ab0ebf6bdc7052408] | committer: Andreas Rheinhardt

avcodec/mjpegdec: Remove redundant initialization

Now that the correct number of codes is used, it is no longer necessary
to initialize the lengths of the codes at all any more as the length of
the actually used codes is set later anyway.

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

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

 libavcodec/mjpegdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index a56afc0fb7..147dd819e5 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -69,7 +69,7 @@ static int build_vlc(VLC *vlc, const uint8_t *bits_table,
                      const uint8_t *val_table, int nb_codes,
                      int is_ac)
 {
-    uint8_t huff_size[256] = { 0 };
+    uint8_t huff_size[256];
     uint16_t huff_code[256];
     uint16_t huff_sym[256];
     int i;



More information about the ffmpeg-cvslog mailing list