diff options
author | Robert Shih <robertshih@google.com> | 2015-02-02 15:29:51 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-02 15:29:51 +0000 |
commit | 82bbd248d0578e5da04aa95d9906006275c330b5 (patch) | |
tree | 12f5ca992ef7b93e46463a0eb0f53910c76a24b7 /media/libmediaplayerservice/nuplayer | |
parent | f5a60185ec550d8447a44172027925550e6849d9 (diff) | |
parent | c37a6e6bbe038cf94d11abdb6f8003e7476e11af (diff) | |
download | frameworks_av-82bbd248d0578e5da04aa95d9906006275c330b5.zip frameworks_av-82bbd248d0578e5da04aa95d9906006275c330b5.tar.gz frameworks_av-82bbd248d0578e5da04aa95d9906006275c330b5.tar.bz2 |
am c37a6e6b: am 7a434265: Merge "Wrong format used in seamless check" into lmp-mr1-dev
* commit 'c37a6e6bbe038cf94d11abdb6f8003e7476e11af':
Wrong format used in seamless check
Diffstat (limited to 'media/libmediaplayerservice/nuplayer')
-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; |