From 73e4d3e55ea103dfbb0e26ed47019fda2612a902 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 30 Oct 2012 15:21:54 +0000 Subject: Try to use the previous frame rather than the current one when padding PTS gaps. --- src/lib/ffmpeg_decoder.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib/ffmpeg_decoder.h') diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h index abcdfa0b2..58e08a779 100644 --- a/src/lib/ffmpeg_decoder.h +++ b/src/lib/ffmpeg_decoder.h @@ -89,7 +89,11 @@ private: int _video_stream; int _audio_stream; ///< may be < 0 if there is no audio int _subtitle_stream; ///< may be < 0 if there is no subtitle - AVFrame* _frame; + + AVFrame* _video_frame[2]; + int _last_video_frame; + int _this_video_frame; + AVFrame* _audio_frame; std::vector _audio_streams; std::vector _subtitle_streams; -- cgit v1.2.3