diff options
author | Andreas Huber <andih@google.com> | 2012-11-16 11:15:44 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-11-16 11:15:44 -0800 |
commit | 4cf1bdef135d6ebf6ccd404aacc8917f9887a07a (patch) | |
tree | 205bbcf5620477e1b4b7c83db58b571d83dd445f /cmds/stagefright | |
parent | a1c1a7e4c9cb37726e4afc10d6678666087f8e1d (diff) | |
download | frameworks_av-4cf1bdef135d6ebf6ccd404aacc8917f9887a07a.zip frameworks_av-4cf1bdef135d6ebf6ccd404aacc8917f9887a07a.tar.gz frameworks_av-4cf1bdef135d6ebf6ccd404aacc8917f9887a07a.tar.bz2 |
Only pass the surface to the video decoder.
Change-Id: Ice0cfc0021fdd9fe053be6ee324cbc64226ed122
Diffstat (limited to 'cmds/stagefright')
-rw-r--r-- | cmds/stagefright/SimplePlayer.cpp | 6 |
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 */); |