[FFmpeg-cvslog] ac3dec: Simplify skipping

Luca Barbato git at videolan.org
Wed Mar 15 22:58:33 EET 2017


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Jul 18 19:50:35 2016 +0200| [3db51bf671defd47f2ec5ab67b11fb7730fb5e5a] | committer: Diego Biurrun

ac3dec: Simplify skipping

skip_bits_long() can skip up to 32-bit ranges.

Signed-off-by: Diego Biurrun <diego at biurrun.de>

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

 libavcodec/ac3dec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index f3e3da5..a263164 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -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



More information about the ffmpeg-cvslog mailing list