diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-17 12:46:16 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-17 13:11:57 +0400 |
commit | f2619cbd61482dc09b75a4e0d01f8957a9460654 (patch) | |
tree | 687006c9987689109ac53533ca16221d4b80d391 /doc | |
parent | 9db6aaeb2c1ed9e8eaeab4bddbb71926236c5620 (diff) |
examples/filtering_audio: enable ref counted frames
Fixes accessing freed memory
Signe-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/filtering_audio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c index 67588aa301..d629d79e75 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) { |