Lines 120-125
static void floor1_pack (vorbis_info_floor *i,oggpack_buffer *opb){
Link Here
|
120 |
} |
120 |
} |
121 |
} |
121 |
} |
122 |
|
122 |
|
|
|
123 |
static int icomp(const void *a,const void *b){ |
124 |
return(**(int **)a-**(int **)b); |
125 |
} |
123 |
|
126 |
|
124 |
static vorbis_info_floor *floor1_unpack (vorbis_info *vi,oggpack_buffer *opb){ |
127 |
static vorbis_info_floor *floor1_unpack (vorbis_info *vi,oggpack_buffer *opb){ |
125 |
codec_setup_info *ci=vi->codec_setup; |
128 |
codec_setup_info *ci=vi->codec_setup; |
Lines 164-169
static vorbis_info_floor *floor1_unpack (vorbis_info *vi,oggpack_buffer *opb){
Link Here
|
164 |
info->postlist[0]=0; |
167 |
info->postlist[0]=0; |
165 |
info->postlist[1]=1<<rangebits; |
168 |
info->postlist[1]=1<<rangebits; |
166 |
|
169 |
|
|
|
170 |
/* don't allow repeated values in post list as they'd result in |
171 |
zero-length segments */ |
172 |
{ |
173 |
int *sortpointer[VIF_POSIT+2]; |
174 |
for(j=0;j<count+2;j++)sortpointer[j]=info->postlist+j; |
175 |
qsort(sortpointer,count+2,sizeof(*sortpointer),icomp); |
176 |
|
177 |
for(j=1;j<count+2;j++) |
178 |
if(*sortpointer[j-1]==*sortpointer[j])goto err_out; |
179 |
} |
180 |
|
167 |
return(info); |
181 |
return(info); |
168 |
|
182 |
|
169 |
err_out: |
183 |
err_out: |
Lines 171-180
static vorbis_info_floor *floor1_unpack (vorbis_info *vi,oggpack_buffer *opb){
Link Here
|
171 |
return(NULL); |
185 |
return(NULL); |
172 |
} |
186 |
} |
173 |
|
187 |
|
174 |
static int icomp(const void *a,const void *b){ |
|
|
175 |
return(**(int **)a-**(int **)b); |
176 |
} |
177 |
|
178 |
static vorbis_look_floor *floor1_look(vorbis_dsp_state *vd, |
188 |
static vorbis_look_floor *floor1_look(vorbis_dsp_state *vd, |
179 |
vorbis_info_floor *in){ |
189 |
vorbis_info_floor *in){ |
180 |
|
190 |
|
181 |
- |
|
|