goldfish-codecs: use guest mode if mEnableAndroidNativeBuffers disabled
When mEnableAndroidNativeBuffers is disabled, there will be no color
buffer to render to on the host.
Just use guest mode in this case.
BUG: 150378029
Change-Id: I97a7a52d6f70380bf44d856d37771bf884982038
diff --git a/system/codecs/omx/avcdec/GoldfishAVCDec.cpp b/system/codecs/omx/avcdec/GoldfishAVCDec.cpp
index 027524e..d90241d 100644
--- a/system/codecs/omx/avcdec/GoldfishAVCDec.cpp
+++ b/system/codecs/omx/avcdec/GoldfishAVCDec.cpp
@@ -136,6 +136,9 @@
status_t GoldfishAVCDec::initDecoder() {
/* Initialize the decoder */
+ if (mEnableAndroidNativeBuffers == false) {
+ mRenderMode = RenderMode::RENDER_BY_GUEST_CPU;
+ }
mContext.reset(new MediaH264Decoder(mRenderMode));
mContext->initH264Context(mWidth,
mHeight,