Unified · Split
| @@ -116,8 +116,8 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int · 115 unmodified lines | |||
| 116 | index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr; | 116 | index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr; |
| 117 | frac = (frac + dst_index * (int64_t)dst_incr_frac) % c->src_incr; | 117 | frac = (frac + dst_index * (int64_t)dst_incr_frac) % c->src_incr; |
| 118 | av_assert2(index >= 0); | 118 | av_assert2(index >= 0); |
| 119 | *consumed= index >> c->phase_shift; | 119 | *consumed= index; |
| 120 | index &= c->phase_mask; | 120 | index = 0; |
| 121 | }else if(compensation_distance == 0 && !c->linear && index >= 0){ | 121 | }else if(compensation_distance == 0 && !c->linear && index >= 0){ |
| 122 | int sample_index = 0; | 122 | int sample_index = 0; |
| 123 | for(dst_index=0; dst_index < dst_size; dst_index++){ | 123 | for(dst_index=0; dst_index < dst_size; dst_index++){ |