diff options
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index accb6b3a94..3dddafca10 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1804,6 +1804,9 @@ void avcodec_flush_buffers(AVCodecContext *avctx) ff_thread_flush(avctx); else if (avctx->codec->flush) avctx->codec->flush(avctx); + + if (!avctx->refcounted_frames) + av_frame_unref(&avctx->internal->to_free); } int av_get_exact_bits_per_sample(enum AVCodecID codec_id) |