[FFmpeg-cvslog] avformat/flvdec: discard inconsistent timestamps
Michael Niedermayer
git at videolan.org
Thu Mar 13 07:49:02 CET 2014
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Wed Mar 12 01:50:41 2014 +0100| [4362a222e2d20aaaa894c38d77b7fb83fd600876] | committer: Carl Eugen Hoyos
avformat/flvdec: discard inconsistent timestamps
Fixes Ticket3425
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit dbc3e1109cddd7ab653dce0f7758bad17b94803d)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4362a222e2d20aaaa894c38d77b7fb83fd600876
---
libavformat/flvdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index e2498db..1342bbc 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -938,6 +938,10 @@ retry_duration:
flv->wrong_dts = 1;
av_log(s, AV_LOG_WARNING,
"negative cts, previous timestamps might be wrong\n");
+ } else if (FFABS(dts - pts) > 1000*60*15) {
+ av_log(s, AV_LOG_WARNING,
+ "invalid timestamps %"PRId64" %"PRId64"\n", dts, pts);
+ dts = pts = AV_NOPTS_VALUE;
}
if (flv->wrong_dts)
dts = AV_NOPTS_VALUE;
More information about the ffmpeg-cvslog
mailing list