diff options
author | Robert Shih <robertshih@google.com> | 2015-02-02 15:37:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-02 15:37:10 +0000 |
commit | d7dbf4179aa87a018d4a8a4cd0958a5ed5d7fe5f (patch) | |
tree | ee55d13457f0cf3d10883b2ac9ea68905e5ba180 | |
parent | 5aa874ad77f366d93abe118b1edab1511ec04dec (diff) | |
parent | 82bbd248d0578e5da04aa95d9906006275c330b5 (diff) | |
download | frameworks_av-d7dbf4179aa87a018d4a8a4cd0958a5ed5d7fe5f.zip frameworks_av-d7dbf4179aa87a018d4a8a4cd0958a5ed5d7fe5f.tar.gz frameworks_av-d7dbf4179aa87a018d4a8a4cd0958a5ed5d7fe5f.tar.bz2 |
am 82bbd248: am c37a6e6b: am 7a434265: Merge "Wrong format used in seamless check" into lmp-mr1-dev
* commit '82bbd248d0578e5da04aa95d9906006275c330b5':
Wrong format used in seamless check
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp index 2abd9d6..5d98d98 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp @@ -823,7 +823,7 @@ bool NuPlayer::Decoder::supportsSeamlessAudioFormatChange( const char * keys[] = { "channel-count", "sample-rate", "is-adts" }; for (unsigned int i = 0; i < sizeof(keys) / sizeof(keys[0]); i++) { int32_t oldVal, newVal; - if (!mOutputFormat->findInt32(keys[i], &oldVal) || + if (!mInputFormat->findInt32(keys[i], &oldVal) || !targetFormat->findInt32(keys[i], &newVal) || oldVal != newVal) { return false; @@ -831,7 +831,7 @@ bool NuPlayer::Decoder::supportsSeamlessAudioFormatChange( } sp<ABuffer> oldBuf, newBuf; - if (mOutputFormat->findBuffer("csd-0", &oldBuf) && + if (mInputFormat->findBuffer("csd-0", &oldBuf) && targetFormat->findBuffer("csd-0", &newBuf)) { if (oldBuf->size() != newBuf->size()) { return false; @@ -843,7 +843,7 @@ bool NuPlayer::Decoder::supportsSeamlessAudioFormatChange( } bool NuPlayer::Decoder::supportsSeamlessFormatChange(const sp<AMessage> &targetFormat) const { - if (mOutputFormat == NULL) { + if (mInputFormat == NULL) { return false; } @@ -852,7 +852,7 @@ bool NuPlayer::Decoder::supportsSeamlessFormatChange(const sp<AMessage> &targetF } AString oldMime, newMime; - if (!mOutputFormat->findString("mime", &oldMime) + if (!mInputFormat->findString("mime", &oldMime) || !targetFormat->findString("mime", &newMime) || !(oldMime == newMime)) { return false; |