ignore wrong negative cts values created by quicktime

Originally committed as revision 5229 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2006-03-27 16:19:51 +00:00
parent 22b48b85b6
commit b0519015f0
1 changed files with 6 additions and 0 deletions

View File

@ -1339,6 +1339,12 @@ static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
int count =get_be32(pb); int count =get_be32(pb);
int duration =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].count = count;
sc->ctts_data[i].duration= duration; sc->ctts_data[i].duration= duration;