[FFmpeg-devel] [PATCH] examples/filtering_audio: fix frame leak.

Nicolas George nicolas.george at normalesup.org
Thu Apr 18 15:16:03 CEST 2013


The frame is not used after being added to the filter
graph, there is no need to keep the reference.

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 doc/examples/filtering_audio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index f674052..b6b05a2 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -227,7 +227,7 @@ int main(int argc, char **argv)
 
             if (got_frame) {
                 /* push the audio data from decoded frame into the filtergraph */
-                if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, AV_BUFFERSRC_FLAG_KEEP_REF) < 0) {
+                if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, 0) < 0) {
                     av_log(NULL, AV_LOG_ERROR, "Error while feeding the audio filtergraph\n");
                     break;
                 }
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list