]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/magicyuv: Don't zero unnecessarily
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 31 Aug 2020 17:51:03 +0000 (19:51 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 1 Sep 2020 09:05:38 +0000 (11:05 +0200)
The code already checks that exactly the expected amount of entries are
read and set. Ergo it is unnecessary to zero them at the beginning.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/magicyuv.c

index f2204f340146661a1b563a99e0302cf6293f21e5..9282b397239f94a361d761fa8e2ceabfdd700411 100644 (file)
@@ -453,7 +453,6 @@ static int build_huffman(AVCodecContext *avctx, GetBitContext *gbit, int max)
     MagicYUVContext *s = avctx->priv_data;
     int i = 0, j = 0, k;
 
-    memset(s->len, 0, sizeof(s->len));
     while (get_bits_left(gbit) >= 8) {
         int b = get_bits(gbit, 1);
         int x = get_bits(gbit, 7);