summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
diff options
context:
space:
mode:
authorjoakim johansson <joakim.c.johansson@sonymobile.com>2015-01-30 14:16:03 +0100
committerRobert Shih <robertshih@google.com>2015-01-30 18:15:57 -0800
commit7abbd4c954e26fb69235831e11090ad61cec7b94 (patch)
tree20c13e7b64e248ec04e8130f1474fdad80d8c800 /media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
parent64c496c8d51c71605cd34a510da2ecd8180656ec (diff)
downloadframeworks_av-7abbd4c954e26fb69235831e11090ad61cec7b94.zip
frameworks_av-7abbd4c954e26fb69235831e11090ad61cec7b94.tar.gz
frameworks_av-7abbd4c954e26fb69235831e11090ad61cec7b94.tar.bz2
Wrong format used in seamless check
The targetFormat that is sent to supportsSeamlessFormatChange function corresponds to the data in mInputFormat but the format provided is the output format, so the check will always return false. Use the input format instead. Bug: 18821145 Change-Id: Iea3cbd59e423da5f2f813e98505b40dc341061b8
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp8
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;