summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorDongwon Kang <dwkang@google.com>2011-06-17 22:52:19 +0900
committerDongwon Kang <dwkang@google.com>2011-06-20 17:35:19 +0900
commit48810fdda5664e89f2efc2592a60c8d29d7bb7a5 (patch)
tree1f1e673ec652d4b593301b031629e9d2d5317772 /media
parentb0cd4e2e7c51dfd0ad8959dda7e1bd26fd52665d (diff)
downloadframeworks_base-48810fdda5664e89f2efc2592a60c8d29d7bb7a5.zip
frameworks_base-48810fdda5664e89f2efc2592a60c8d29d7bb7a5.tar.gz
frameworks_base-48810fdda5664e89f2efc2592a60c8d29d7bb7a5.tar.bz2
OGG: To prevent mediaserver from crash by SIGFPE (divide by zero) and more guarding in getMetaData().
BUG:4689872 Change-Id: I483bf230b5571a8d1815b954dce2c52e9a5f1f37
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/OggExtractor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp
index 1560b8e..29e6907 100644
--- a/media/libstagefright/OggExtractor.cpp
+++ b/media/libstagefright/OggExtractor.cpp
@@ -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;
}