aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-17 00:21:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-17 00:21:22 +0200
commita4a2e894fca19e284c28a4114d7718bf5588dfa1 (patch)
tree25d5681f8615a5349d2fc4b77e7f98e78f46d9ad /libavcodec/utils.c
parent1f87cbe8349d8662c0d6ead40cc39620b01ae0da (diff)
parent985f34b75653d02eda8eb8def3412f8577f19b01 (diff)
downloadffmpeg-a4a2e894fca19e284c28a4114d7718bf5588dfa1.tar.gz
Merge commit '985f34b75653d02eda8eb8def3412f8577f19b01'
* commit '985f34b75653d02eda8eb8def3412f8577f19b01': utils: fix avcodec_flush_buffers pre-reference counting compatibility Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d2fa73fb75..97d066f8f9 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2666,6 +2666,9 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
avctx->pts_correction_last_pts =
avctx->pts_correction_last_dts = INT64_MIN;
+
+ if (!avctx->refcounted_frames)
+ av_frame_unref(&avctx->internal->to_free);
}
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)