Unified · Split
| @@ -672,8 +672,9 @@ static int run_channel_cwt(AVFilterContext *ctx, void *arg, int jobnr, int nb_jo · 671 unmodified lines | |||
| 672 | 672 | ||
| 673 | memset(isrc, 0, sizeof(*isrc) * output_padding_size); | 673 | memset(isrc, 0, sizeof(*isrc) * output_padding_size); |
| 674 | if (offset == 0) { | 674 | if (offset == 0) { |
| 675 | const unsigned *kindex = index + kernel_start; | ||
| 675 | for (int i = 0; i < kernel_range; i++) { | 676 | for (int i = 0; i < kernel_range; i++) { |
| 676 | const unsigned n = index[i + kernel_start]; | 677 | const unsigned n = kindex[i]; |
| 677 | 678 | ||
| 678 | isrc[n].re += dstx[i].re; | 679 | isrc[n].re += dstx[i].re; |
| 679 | isrc[n].im += dstx[i].im; | 680 | isrc[n].im += dstx[i].im; |
| @@ -1247,8 +1248,11 @@ static int activate(AVFilterContext *ctx) · 567 unmodified lines | |||
| 1247 | ff_filter_execute(ctx, run_channels_cwt_prepare, fin, NULL, | 1248 | ff_filter_execute(ctx, run_channels_cwt_prepare, fin, NULL, |
| 1248 | FFMIN(s->nb_threads, s->nb_channels)); | 1249 | FFMIN(s->nb_threads, s->nb_channels)); |
| 1249 | if (fin) { | 1250 | if (fin) { |
| 1250 | if (s->hop_index == 0) | 1251 | if (s->hop_index == 0) { |
| 1251 | s->in_pts = fin->pts; | 1252 | s->in_pts = fin->pts; |
| 1253 | if (s->old_pts == AV_NOPTS_VALUE) | ||
| 1254 | s->old_pts = av_rescale_q(s->in_pts, inlink->time_base, outlink->time_base) - 1; | ||
| 1255 | } | ||
| 1252 | s->hop_index += fin->nb_samples; | 1256 | s->hop_index += fin->nb_samples; |
| 1253 | av_frame_free(&fin); | 1257 | av_frame_free(&fin); |
| 1254 | } else { | 1258 | } else { |