Merge commit '985f34b75653d02eda8eb8def3412f8577f19b01'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 16 Jun 2013 22:21:22 +0000 (00:21 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 16 Jun 2013 22:21:22 +0000 (00:21 +0200)
* commit '985f34b75653d02eda8eb8def3412f8577f19b01':
  utils: fix avcodec_flush_buffers pre-reference counting compatibility

Conflicts:
libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c

index d2fa73fb75163e12c466b6375d5e145d97a4ac02..97d066f8f92d69796cd71921a226c6a64a7bb020 100644 (file)
@@ -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)