Reset pts_correction state on codec flush.
authorRobert Nagy <ronag89@gmail.com>
Wed, 18 Apr 2012 12:32:27 +0000 (14:32 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 18 Apr 2012 13:34:34 +0000 (15:34 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c

index f6c9466fbcfc2e72024d797f5edeef52c7399c40..c6e401268b43a73da0409a65469f94e5cc9ee139 100644 (file)
@@ -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)