ffmpeg: use av_buffersrc_add_frame() for audio too
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 17 May 2012 15:15:47 +0000 (17:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 17 May 2012 15:19:35 +0000 (17:19 +0200)
fixes a memleak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index b197fa1..c71d860 100644 (file)
--- 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
     }