[FFmpeg-cvslog] examples/filtering_audio: enable ref counted frames

Michael Niedermayer git at videolan.org
Wed Apr 17 11:21:15 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 17 10:46:16 2013 +0200| [f2619cbd61482dc09b75a4e0d01f8957a9460654] | committer: Michael Niedermayer

examples/filtering_audio: enable ref counted frames

Fixes accessing freed memory

Signe-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 doc/examples/filtering_audio.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index 67588aa..d629d79 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -70,6 +70,7 @@ static int open_input_file(const char *filename)
     }
     audio_stream_index = ret;
     dec_ctx = fmt_ctx->streams[audio_stream_index]->codec;
+    av_opt_set_int(dec_ctx, "refcounted_frames", 1, 0);
 
     /* init the audio decoder */
     if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) {



More information about the ffmpeg-cvslog mailing list