summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.cpp1
-rw-r--r--media/libstagefright/Utils.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.cpp
index 0b50d0d..6bed918 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.cpp
@@ -224,6 +224,7 @@ sp<ABuffer> NuPlayer::DecoderPassThrough::aggregateBuffer(
} else {
// decided not to aggregate
aggregate = accessUnit;
+ setPcmFormat(aggregate->meta());
}
return aggregate;
diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp
index e9d585f..592510b 100644
--- a/media/libstagefright/Utils.cpp
+++ b/media/libstagefright/Utils.cpp
@@ -893,7 +893,7 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo,
info.sample_rate = srate;
int32_t cmask = 0;
- if (!meta->findInt32(kKeyChannelMask, &cmask)) {
+ if (!meta->findInt32(kKeyChannelMask, &cmask) || 0 == cmask) {
ALOGV("track of type '%s' does not publish channel mask", mime);
// Try a channel count instead