Commit 203f6512 authored by Monty's avatar Monty
Browse files

I had forgotten that the res2 top level interprets limits differently

than res0 and res1; guarding code (and garbled playback) fixed

svn path=/trunk/vorbis/; revision=13154
parent 20d113be
......@@ -847,15 +847,15 @@ int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl,
/* move all this setup out later */
int samples_per_partition=info->grouping;
int partitions_per_word=look->phrasebook->dim;
int end=(info->end<vb->pcmend/2?info->end:vb->pcmend/2);
int n=end-info->begin;
int max=(vb->pcmend*ch)>>1;
int end=(info->end<max?info->end:max);
int n=info->end-info->begin;
int partvals=n/samples_per_partition;
int partwords=(partvals+partitions_per_word-1)/partitions_per_word;
int **partword=_vorbis_block_alloc(vb,partwords*sizeof(*partword));
if(i==ch)return(0); /* no nonzero vectors */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment