summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-06-20 16:08:06 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-20 16:08:06 -0700
commit02392b41de3577251683fb1e79a3c893275e6e0d (patch)
tree223509b6f46d887893d3b6d13b515c399868db29 /media
parent03dbfbb5cfdd5853560406287b760df6522063d7 (diff)
parent48810fdda5664e89f2efc2592a60c8d29d7bb7a5 (diff)
downloadframeworks_base-02392b41de3577251683fb1e79a3c893275e6e0d.zip
frameworks_base-02392b41de3577251683fb1e79a3c893275e6e0d.tar.gz
frameworks_base-02392b41de3577251683fb1e79a3c893275e6e0d.tar.bz2
Merge "OGG: To prevent mediaserver from crash by SIGFPE (divide by zero) and more guarding in getMetaData()."
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;
}