Commit f2619cbd authored by Michael Niedermayer's avatar Michael Niedermayer

examples/filtering_audio: enable ref counted frames

Fixes accessing freed memory
Signe-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9db6aaeb
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment