OGG: To prevent mediaserver from crash by SIGFPE (divide by zero) and more guarding in getMetaData().
BUG:4689872 Change-Id: I483bf230b5571a8d1815b954dce2c52e9a5f1f37
This commit is contained in:
@@ -730,8 +730,9 @@ status_t MyVorbisExtractor::verifyHeader(
|
||||
off64_t size;
|
||||
if (mSource->getSize(&size) == OK) {
|
||||
uint64_t bps = approxBitrate();
|
||||
|
||||
mMeta->setInt64(kKeyDuration, size * 8000000ll / bps);
|
||||
if (bps != 0) {
|
||||
mMeta->setInt64(kKeyDuration, size * 8000000ll / bps);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user