Signed-off-by: Michael Niedermayer <michaelni@gmx.at>tags/n0.9
| @@ -248,10 +248,9 @@ int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int | |||||
| dst[dst_index] = src[index2>>32]; | dst[dst_index] = src[index2>>32]; | ||||
| index2 += incr; | index2 += incr; | ||||
| } | } | ||||
| frac += dst_index * dst_incr_frac; | |||||
| index += dst_index * dst_incr; | index += dst_index * dst_incr; | ||||
| index += frac / c->src_incr; | |||||
| frac %= c->src_incr; | |||||
| index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr; | |||||
| frac = (frac + dst_index * (int64_t)dst_incr_frac) % c->src_incr; | |||||
| }else{ | }else{ | ||||
| for(dst_index=0; dst_index < dst_size; dst_index++){ | for(dst_index=0; dst_index < dst_size; dst_index++){ | ||||
| FELEM *filter= c->filter_bank + c->filter_length*(index & c->phase_mask); | FELEM *filter= c->filter_bank + c->filter_length*(index & c->phase_mask); | ||||
| @@ -269,10 +269,9 @@ int swr_resample(AVResampleContext *c, short *dst, const short *src, int *consum | |||||
| dst[dst_index] = src[index2>>32]; | dst[dst_index] = src[index2>>32]; | ||||
| index2 += incr; | index2 += incr; | ||||
| } | } | ||||
| frac += dst_index * dst_incr_frac; | |||||
| index += dst_index * dst_incr; | index += dst_index * dst_incr; | ||||
| index += frac / c->src_incr; | |||||
| frac %= c->src_incr; | |||||
| index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr; | |||||
| frac = (frac + dst_index * (int64_t)dst_incr_frac) % c->src_incr; | |||||
| }else{ | }else{ | ||||
| for(dst_index=0; dst_index < dst_size; dst_index++){ | for(dst_index=0; dst_index < dst_size; dst_index++){ | ||||
| FELEM *filter= c->filter_bank + c->filter_length*(index & c->phase_mask); | FELEM *filter= c->filter_bank + c->filter_length*(index & c->phase_mask); | ||||