aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-11-26 15:30:34 +0000
committerMans Rullgard <mans@mansr.com>2011-12-02 21:52:09 +0000
commit51a16077da2a58d85a10dcb1259756ad6099b5d5 (patch)
tree2e6d3df4200d40e37a3232550e0a762064b8fe52
parent59807fee6dfca909d966da3d2203d6c3cbf356c8 (diff)
downloadffmpeg-51a16077da2a58d85a10dcb1259756ad6099b5d5.tar.gz
svq1dec: avoid undefined get_bits(0) call
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r--libavcodec/svq1dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 8569615aa9..7eb6e607d1 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -195,7 +195,8 @@ static const uint8_t string_table[256] = {
#define SVQ1_CALC_CODEBOOK_ENTRIES(cbook)\
codebook = (const uint32_t *) cbook[level];\
- bit_cache = get_bits (bitbuf, 4*stages);\
+ if (stages > 0)\
+ bit_cache = get_bits (bitbuf, 4*stages);\
/* calculate codebook entries for this vector */\
for (j=0; j < stages; j++) {\
entries[j] = (((bit_cache >> (4*(stages - j - 1))) & 0xF) + 16*j) << (level + 1);\