if (av_frame_is_writable(in)) {
out = in;
} else {
- out = ff_get_audio_buffer(inlink, in->nb_samples);
+ out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);
right = average + mult * (right - average);
if (s->clip) {
- dst[n * 2 ] = av_clipf(left, -1, 1);
- dst[n * 2 + 1] = av_clipf(right, -1, 1);
+ left = av_clipf(left, -1, 1);
+ right = av_clipf(right, -1, 1);
}
+
+ dst[n * 2 ] = left;
+ dst[n * 2 + 1] = right;
}
if (out != in)