aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-03-27 16:19:51 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-03-27 16:19:51 +0000
commitb0519015f055bfce2912d5304473e12e9308d649 (patch)
treee912dcd46b5ccc4f43694b077c7114994f5cce09
parent22b48b85b647390dd370cd0a1f41f371f4c010f1 (diff)
downloadffmpeg-b0519015f055bfce2912d5304473e12e9308d649.tar.gz
ignore wrong negative cts values created by quicktime
Originally committed as revision 5229 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mov.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 6d6d3d5787..6863f39250 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1339,6 +1339,12 @@ static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
int count =get_be32(pb);
int duration =get_be32(pb);
+ if (duration < 0) {
+ av_log(c->fc, AV_LOG_ERROR, "negative ctts, ignoring\n");
+ sc->ctts_count = 0;
+ url_fskip(pb, 8 * (entries - i - 1));
+ break;
+ }
sc->ctts_data[i].count = count;
sc->ctts_data[i].duration= duration;