ac3dec: Simplify skipping
authorLuca Barbato <lu_zero@gentoo.org>
Mon, 18 Jul 2016 17:50:35 +0000 (19:50 +0200)
committerDiego Biurrun <diego@biurrun.de>
Fri, 29 Jul 2016 16:46:48 +0000 (18:46 +0200)
skip_bits_long() can skip up to 32-bit ranges.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
libavcodec/ac3dec.c

index f3e3da5..a263164 100644 (file)
@@ -1271,8 +1271,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
     /* unused dummy data */
     if (s->skip_syntax && get_bits1(gbc)) {
         int skipl = get_bits(gbc, 9);
-        while (skipl--)
-            skip_bits(gbc, 8);
+        skip_bits_long(gbc, 8 * skipl);
     }
 
     /* unpack the transform coefficients