From 22a3a5ee0c7d1b9a8c9497d347261266416ac379 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 17 May 2012 17:15:47 +0200 Subject: [PATCH] ffmpeg: use av_buffersrc_add_frame() for audio too fixes a memleak Signed-off-by: Michael Niedermayer --- ffmpeg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index b197fa15c3..c71d860caa 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2514,8 +2514,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) #ifdef SRCA av_buffersrc_write_frame(ist->filters[i]->filter, decoded_frame); #else - AVFilterBufferRef *fb= avfilter_get_audio_buffer_ref_from_frame(decoded_frame, AV_PERM_WRITE); - av_buffersrc_add_ref(ist->filters[i]->filter, fb, 0*AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT); + av_buffersrc_add_frame(ist->filters[i]->filter, decoded_frame, 0); #endif }