[FFmpeg-cvslog] avformat/utils: reset pts_buffer in estimate_timings_from_pts()
Michael Niedermayer
git at videolan.org
Sat Feb 22 14:37:32 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Feb 22 14:22:31 2014 +0100| [d4dfa97ae3ad239e7b771d0baf7716947c397dfd] | committer: Michael Niedermayer
avformat/utils: reset pts_buffer in estimate_timings_from_pts()
This fixes the first few dts after find_stream_info
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d4dfa97ae3ad239e7b771d0baf7716947c397dfd
---
libavformat/utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index cb048f9..357d95b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2441,9 +2441,13 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
avio_seek(ic->pb, old_offset, SEEK_SET);
for (i = 0; i < ic->nb_streams; i++) {
+ int j;
+
st = ic->streams[i];
st->cur_dts = st->first_dts;
st->last_IP_pts = AV_NOPTS_VALUE;
+ for (j = 0; j < MAX_REORDER_DELAY + 1; j++)
+ st->pts_buffer[j] = AV_NOPTS_VALUE;
}
}
More information about the ffmpeg-cvslog
mailing list