[FFmpeg-cvslog] avformat/flvdec: discard inconsistent timestamps
Michael Niedermayer
git at videolan.org
Thu Mar 13 07:48:59 CET 2014
ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Wed Mar 12 01:50:41 2014 +0100| [f31682f2f2b10157b11c5d93c3773b724e0efe9c] | 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)
Conflicts:
libavformat/flvdec.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f31682f2f2b10157b11c5d93c3773b724e0efe9c
---
libavformat/flvdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index d0511f1..38801f2 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -815,6 +815,10 @@ retry_duration:
if (cts < 0) { // dts are wrong
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