diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2013-07-08 11:27:53 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-07-08 11:27:53 -0700 |
commit | 90eb959ac9bd53049af73ed0ebf24b817a0a153a (patch) | |
tree | 365bf97473c8d1224c2295ef295b30f65e30c5a0 | |
parent | 1545d35f871ff3527a716af659ddadebe3253548 (diff) | |
parent | 046d9c8dad97118535778cf93efc662ceb5fec8d (diff) | |
download | frameworks_av-90eb959ac9bd53049af73ed0ebf24b817a0a153a.zip frameworks_av-90eb959ac9bd53049af73ed0ebf24b817a0a153a.tar.gz frameworks_av-90eb959ac9bd53049af73ed0ebf24b817a0a153a.tar.bz2 |
am 046d9c8d: am 06197925: am 267363ee: Merge "Prevent Media Server crash while the AwesomePlayer getBitrate return true with mBitrate equals to zero."
* commit '046d9c8dad97118535778cf93efc662ceb5fec8d':
Prevent Media Server crash while the AwesomePlayer getBitrate return true with mBitrate equals to zero.
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 6c197e2..b505518 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -617,7 +617,7 @@ bool AwesomePlayer::getBitrate(int64_t *bitrate) { bool AwesomePlayer::getCachedDuration_l(int64_t *durationUs, bool *eos) { int64_t bitrate; - if (mCachedSource != NULL && getBitrate(&bitrate)) { + if (mCachedSource != NULL && getBitrate(&bitrate) && (bitrate > 0)) { status_t finalStatus; size_t cachedDataRemaining = mCachedSource->approxDataRemaining(&finalStatus); *durationUs = cachedDataRemaining * 8000000ll / bitrate; |