aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-12 01:50:41 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-03-13 07:37:58 +0100
commitf31682f2f2b10157b11c5d93c3773b724e0efe9c (patch)
tree90705805bad2d34f7a5bf37bf8a9e460fac86e5f
parentfb44a3e4a3e333b690fc00bd051c4c2c1a882109 (diff)
downloadffmpeg-f31682f2f2b10157b11c5d93c3773b724e0efe9c.tar.gz
avformat/flvdec: discard inconsistent timestamps
Fixes Ticket3425 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit dbc3e1109cddd7ab653dce0f7758bad17b94803d) Conflicts: libavformat/flvdec.c
-rw-r--r--libavformat/flvdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index d0511f1582..38801f2d58 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;