[FFmpeg-cvslog] avfilter/af_headphone: do not free frame that's gonna be reused later

Paul B Mahol git at videolan.org
Sat Jun 24 20:17:55 EEST 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jun 24 18:47:04 2017 +0200| [f483949188dcb2f4c546603bd478100190ee5312] | committer: Paul B Mahol

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

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f483949188dcb2f4c546603bd478100190ee5312
---

 libavfilter/af_headphone.c | 4 +---
 1 file changed, 1 insertion(+), 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);



More information about the ffmpeg-cvslog mailing list