Bug 1142433: Properly scale duration found in movie extend header box. r=k17e

This commit is contained in:
Jean-Yves Avenard 2015-03-18 14:10:57 +11:00
parent 4e705cc782
commit 7079633692

View File

@ -1789,8 +1789,9 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
}
duration = ntohl(duration32);
}
if (duration) {
mFileMetaData->setInt64(kKeyMovieDuration, duration * 1000LL);
if (duration && mHeaderTimescale) {
mFileMetaData->setInt64(
kKeyMovieDuration, (duration * 1000000) / mHeaderTimescale);
}
*offset += chunk_size;