summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-11-16 13:00:45 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-11-16 13:00:46 -0800
commitf91a3abb7d136e75f0f5d999193b8c8297d97628 (patch)
tree1d5244aa83bbd7907604a8d3a73775f0ca4b7f0d
parentb7047796795083484c0bc9003f346b4022c3be9a (diff)
parent4cf1bdef135d6ebf6ccd404aacc8917f9887a07a (diff)
downloadframeworks_av-f91a3abb7d136e75f0f5d999193b8c8297d97628.zip
frameworks_av-f91a3abb7d136e75f0f5d999193b8c8297d97628.tar.gz
frameworks_av-f91a3abb7d136e75f0f5d999193b8c8297d97628.tar.bz2
Merge "Only pass the surface to the video decoder."
-rw-r--r--cmds/stagefright/SimplePlayer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmds/stagefright/SimplePlayer.cpp b/cmds/stagefright/SimplePlayer.cpp
index 7636906..eb3296e 100644
--- a/cmds/stagefright/SimplePlayer.cpp
+++ b/cmds/stagefright/SimplePlayer.cpp
@@ -297,9 +297,11 @@ status_t SimplePlayer::onPrepare() {
AString mime;
CHECK(format->findString("mime", &mime));
+ bool isVideo = !strncasecmp(mime.c_str(), "video/", 6);
+
if (!haveAudio && !strncasecmp(mime.c_str(), "audio/", 6)) {
haveAudio = true;
- } else if (!haveVideo && !strncasecmp(mime.c_str(), "video/", 6)) {
+ } else if (!haveVideo && isVideo) {
haveVideo = true;
} else {
continue;
@@ -320,7 +322,7 @@ status_t SimplePlayer::onPrepare() {
err = state->mCodec->configure(
format,
- mNativeWindow->getSurfaceTextureClient(),
+ isVideo ? mNativeWindow->getSurfaceTextureClient() : NULL,
NULL /* crypto */,
0 /* flags */);