diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-10-29 13:22:36 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-10-30 11:04:06 +0000 |
commit | 2508fa10c6189a093752af2ef75772a5312ea39a (patch) | |
tree | 6d67efb1e1b28caa5676780e0a86dfb563c0a51c /libavcodec/xan.c | |
parent | 1de8dfcbc494e470e5caf35e1cd0650e834d8f7e (diff) | |
download | ffmpeg-2508fa10c6189a093752af2ef75772a5312ea39a.tar.gz |
avcodec/xan: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r-- | libavcodec/xan.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 1c2e97cda2..33bc0b068f 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -111,12 +111,11 @@ static int xan_huffman_decode(uint8_t *dest, int dest_len, uint8_t val = ival; uint8_t *dest_end = dest + dest_len; uint8_t *dest_start = dest; + int ret; GetBitContext gb; - if (ptr_len < 0) - return AVERROR_INVALIDDATA; - - init_get_bits(&gb, ptr, ptr_len * 8); + if ((ret = init_get_bits8(&gb, ptr, ptr_len)) < 0) + return ret; while (val != 0x16) { unsigned idx = val - 0x17 + get_bits1(&gb) * byte; |