Revision 23d82139
libavcodec/binkaudio.c  

114  114 
return AVERROR(ENOMEM); 
115  115  
116  116 
/* populate bands data */ 
117 
s>bands[0] = 1;


117 
s>bands[0] = 2;


118  118 
for (i = 1; i < s>num_bands; i++) 
119 
s>bands[i] = ff_wma_critical_freqs[i  1] * (s>frame_len / 2) / sample_rate_half;


120 
s>bands[s>num_bands] = s>frame_len / 2;


119 
s>bands[i] = (ff_wma_critical_freqs[i  1] * s>frame_len / sample_rate_half) & ~1;


120 
s>bands[s>num_bands] = s>frame_len; 

121  121  
122  122 
s>first = 1; 
123  123 
avctx>sample_fmt = AV_SAMPLE_FMT_S16; 
...  ...  
194  194 
if (width == 0) { 
195  195 
memset(coeffs + i, 0, (j  i) * sizeof(*coeffs)); 
196  196 
i = j; 
197 
while (s>bands[k] * 2 < i)


197 
while (s>bands[k] < i) 

198  198 
q = quant[k++]; 
199  199 
} else { 
200  200 
while (i < j) { 
201 
if (s>bands[k] * 2 == i)


201 
if (s>bands[k] == i) 

202  202 
q = quant[k++]; 
203  203 
coeff = get_bits(gb, width); 
204  204 
if (coeff) { 
Also available in: Unified diff