summaryrefslogtreecommitdiffstats
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
commitc0fc64242a504a6c72670b0db2d648d2a3e208d2 (patch)
tree544a92d1a52b824174c1152201c7ef870bd7467e
parent8c67a583db53eebe65bd0c3abb41909c60a02eb0 (diff)
parentf9fb13966a8e6ba039e88a46d096cd1cce2eb283 (diff)
downloadframeworks_av-c0fc64242a504a6c72670b0db2d648d2a3e208d2.zip
frameworks_av-c0fc64242a504a6c72670b0db2d648d2a3e208d2.tar.gz
frameworks_av-c0fc64242a504a6c72670b0db2d648d2a3e208d2.tar.bz2
Merge "OGG: To prevent mediaserver from crash by SIGFPE (divide by zero) and more guarding in getMetaData()."
-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;
}