Browse Source

avfilter/af_aecho: free input frame after it is being used

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n2.2-rc1
Paul B Mahol 11 years ago
parent
commit
d9d752cfb5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavfilter/af_aecho.c

+ 2
- 1
libavfilter/af_aecho.c View File

@@ -285,10 +285,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
s->echo_samples(s, s->delayptrs, frame->extended_data, out_frame->extended_data, s->echo_samples(s, s->delayptrs, frame->extended_data, out_frame->extended_data,
frame->nb_samples, inlink->channels); frame->nb_samples, inlink->channels);


s->next_pts = frame->pts + av_rescale_q(frame->nb_samples, (AVRational){1, inlink->sample_rate}, inlink->time_base);

if (frame != out_frame) if (frame != out_frame)
av_frame_free(&frame); av_frame_free(&frame);


s->next_pts = frame->pts + av_rescale_q(frame->nb_samples, (AVRational){1, inlink->sample_rate}, inlink->time_base);
return ff_filter_frame(ctx->outputs[0], out_frame); return ff_filter_frame(ctx->outputs[0], out_frame);
} }




Loading…
Cancel
Save