summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNedeljko Babic <nbabic@mips.com>2012-03-26 14:03:50 +0200
committerNedeljko Babic <nbabic@mips.com>2012-04-03 15:38:02 +0200
commitfc601af63d148d015f03b216c01e9734155fbc31 (patch)
treeeb65879fd4760acfba37b32e590c8a19156fbffe
parente7ca3a2588743d706efa0ffa809ba22801fe112e (diff)
downloadtremor-fc601af63d148d015f03b216c01e9734155fbc31.tar.gz
Forward port r14602 from libvorbis.
Correctly handle the nonsensical codebook.dim==0 case. [Import changes from Tremor (1d1f93e 2010-10-13)]
-rw-r--r--codebook.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/codebook.c b/codebook.c
index f01f558..c861993 100644
--- a/codebook.c
+++ b/codebook.c
@@ -473,7 +473,7 @@ int vorbis_book_unpack(oggpack_buffer *opb,codebook *s){
case 1:
/* mapping type 1; implicit values by lattice position */
- quantvals=_book_maptype1_quantvals(s);
+ quantvals=(s->dim==0?0:_book_maptype1_quantvals(s));
/* dec_type choices here are 1,2; 3 doesn't make sense */
{