summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2014-03-12 01:50:41 +0100
committerCarl Eugen Hoyos <[email protected]>2014-03-12 23:54:56 +0100
commit4362a222e2d20aaaa894c38d77b7fb83fd600876 (patch)
tree4526af9e53a9a7c6a1448c20eb5a07c666533e39
parenta9753049b54e4d3dc42cfbaecfcfab488bd9b032 (diff)
avformat/flvdec: discard inconsistent timestamps
Fixes Ticket3425 Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit dbc3e1109cddd7ab653dce0f7758bad17b94803d)
-rw-r--r--libavformat/flvdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index e2498db7ed..1342bbcd42 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;