diff --git a/libavfilter/afir_template.c b/libavfilter/afir_template.c index 8766119d39..ca994f4352 100644 --- a/libavfilter/afir_template.c +++ b/libavfilter/afir_template.c @@ -403,7 +403,8 @@ static int fn(fir_quantum)(AVFilterContext *ctx, AVFrame *out, int ch, int offse seg->part_index[ch] = (seg->part_index[ch] + 1) % nb_partitions; - memmove(src, src + min_part_size, (seg->input_size - min_part_size) * sizeof(*src)); + if (part_size != min_part_size) + memmove(src, src + min_part_size, (seg->input_size - min_part_size) * sizeof(*src)); fn(fir_fadd)(s, ptr, dst, nb_samples); }