avcodec/vorbis: fix decoding of single element huffman trees
Fixes Ticket2893
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 742d860103
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -85,6 +85,11 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num)
|
||||
|
||||
++p;
|
||||
|
||||
for (i = p; (bits[i] == 0) && (i < num); ++i)
|
||||
;
|
||||
if (i == num)
|
||||
return 0;
|
||||
|
||||
for (; p < num; ++p) {
|
||||
if (bits[p] > 32)
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user