summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2010-10-20 16:04:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-20 16:04:12 -0700
commitedffc0fcbe02409e8e56e06c3b1dccc7215d2947 (patch)
tree35965c85b7eacc8723c2f9b0554edfc370863831
parent642a8eac64b7370fd874c4d34654583c50c0850c (diff)
parentbf2ba2a97927c24d14c0e71158abe7b49c557c68 (diff)
downloadframeworks_av-edffc0fcbe02409e8e56e06c3b1dccc7215d2947.zip
frameworks_av-edffc0fcbe02409e8e56e06c3b1dccc7215d2947.tar.gz
frameworks_av-edffc0fcbe02409e8e56e06c3b1dccc7215d2947.tar.bz2
Merge "Fix the non-ANW video decode path."
-rw-r--r--media/libstagefright/OMXCodec.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 560d0f1..2e368b6 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -744,7 +744,8 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta, uint32_t flags) {
mQuirks &= ~kOutputBuffersAreUnreadable;
}
- if (!mIsEncoder
+ if (mNativeWindow != NULL
+ && !mIsEncoder
&& !strncasecmp(mMIME, "video/", 6)
&& !strncmp(mComponentName, "OMX.", 4)) {
status_t err = initNativeWindow();
@@ -1606,7 +1607,7 @@ status_t OMXCodec::allocateBuffers() {
}
status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
- if (mNativeWindow != 0 && portIndex == kPortIndexOutput) {
+ if (mNativeWindow != NULL && portIndex == kPortIndexOutput) {
return allocateOutputBuffersFromNativeWindow();
}
@@ -1676,6 +1677,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
info.mBuffer = buffer;
info.mOwnedByComponent = false;
+ info.mOwnedByNativeWindow = false;
info.mMem = mem;
info.mMediaBuffer = NULL;