avcodec/magicyuv: Don't zero unnecessarily

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>
pull/350/head
Andreas Rheinhardt 4 years ago
parent e8716b7e4c
commit 7f452c099a
  1. 1
      libavcodec/magicyuv.c

@ -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);

Loading…
Cancel
Save