]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mpegvideo: Don't zero-initialize unnecessarily
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 27 Dec 2020 20:16:08 +0000 (21:16 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 31 Dec 2020 21:12:01 +0000 (22:12 +0100)
mbintra_table will be memset to 1 a few lines after its allocation.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/mpegvideo.c

index f92792ae984f3a54f4fc10c22fa55960ccb9ace7..60ed716865ba26a3f74bbefcd0f56f963b6507a7 100644 (file)
@@ -787,7 +787,7 @@ static int init_context_frame(MpegEncContext *s)
     }
 
     /* which mb is an intra block,  init macroblock skip table */
-    if (!FF_ALLOCZ_TYPED_ARRAY(s->mbintra_table, mb_array_size) ||
+    if (!FF_ALLOC_TYPED_ARRAY(s->mbintra_table, mb_array_size) ||
         // Note the + 1 is for a quicker MPEG-4 slice_end detection
         !FF_ALLOCZ_TYPED_ARRAY(s->mbskip_table,  mb_array_size + 2))
         return AVERROR(ENOMEM);