Commit f4839491 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_headphone: do not free frame that's gonna be reused later

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent c90b8809
......@@ -357,10 +357,8 @@ static int headphone_frame(HeadphoneContext *s, AVFilterLink *outlink)
av_audio_fifo_read(s->in[0].fifo, (void **)in->extended_data, s->size);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
if (!out)
return AVERROR(ENOMEM);
}
out->pts = s->pts;
if (s->pts != AV_NOPTS_VALUE)
s->pts += av_rescale_q(out->nb_samples, (AVRational){1, outlink->sample_rate}, outlink->time_base);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment