Merge "OMXNodeInstance: Allow dynamic native handle mode for input buffers" into oc-dev
am: e41dfae5d5
Change-Id: Ib857ac1561aa8cffd22574fb7a8f76869e67b903
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
index 63c1c80..30cee23 100644
--- a/media/libstagefright/omx/OMXNodeInstance.cpp
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -1063,7 +1063,8 @@
}
case OMXBuffer::kBufferTypeSharedMem: {
- if (mPortMode[portIndex] != IOMX::kPortModePresetByteBuffer) {
+ if (mPortMode[portIndex] != IOMX::kPortModePresetByteBuffer
+ && mPortMode[portIndex] != IOMX::kPortModeDynamicANWBuffer) {
break;
}
return useBuffer_l(portIndex, omxBuffer.mMem, NULL, buffer);
@@ -1078,7 +1079,8 @@
case OMXBuffer::kBufferTypeHidlMemory: {
if (mPortMode[portIndex] != IOMX::kPortModePresetByteBuffer
- && mPortMode[portIndex] != IOMX::kPortModeDynamicANWBuffer) {
+ && mPortMode[portIndex] != IOMX::kPortModeDynamicANWBuffer
+ && mPortMode[portIndex] != IOMX::kPortModeDynamicNativeHandle) {
break;
}
sp<IHidlMemory> hidlMemory = mapMemory(omxBuffer.mHidlMemory);
@@ -1093,7 +1095,8 @@
break;
}
- ALOGE("b/77486542");
+ ALOGE("b/77486542 : bufferType = %d vs. portMode = %d",
+ omxBuffer.mBufferType, mPortMode[portIndex]);
android_errorWriteLog(0x534e4554, "77486542");
return INVALID_OPERATION;
}