From c58290e5e51286ee280e9e354dde793528942d53 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Wed, 18 Apr 2012 14:32:27 +0200 Subject: [PATCH] Reset pts_correction state on codec flush. Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index f6c9466fbc..c6e401268b 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1879,6 +1879,9 @@ void avcodec_flush_buffers(AVCodecContext *avctx) ff_thread_flush(avctx); else if(avctx->codec->flush) avctx->codec->flush(avctx); + + avctx->pts_correction_last_pts = + avctx->pts_correction_last_dts = INT64_MIN; } static void video_free_buffers(AVCodecContext *s)