diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-06-24 18:47:04 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-06-24 19:15:57 +0200 |
commit | f483949188dcb2f4c546603bd478100190ee5312 (patch) | |
tree | 0fad40632de4d64ac82977a3725929dcb91096fb /libavfilter/af_headphone.c | |
parent | c90b88090c260a0af018b6c1e955266e24ebf6f4 (diff) |
avfilter/af_headphone: do not free frame that's gonna be reused later
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_headphone.c')
-rw-r--r-- | libavfilter/af_headphone.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index 00dbbcf386..4fd6191bc4 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -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); |