mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
avfilter/af_aecho: free input frame after it is being used
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
9521236881
commit
d9d752cfb5
@ -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…
x
Reference in New Issue
Block a user