wrs_core: enable meta data mode on L
BZ: 230000
Bug:18575549
Ignore buffer return when format change happens
for meta data mode.
The patch was ported from imin_legacy branch: https://android.intel.com:443/291947
Change-Id: I9226eb87d273d25a3c8152d0e5837a29bb574ac1
Signed-off-by: hding3 <haitao.ding@intel.com>
diff --git a/base/src/portbase.cpp b/base/src/portbase.cpp
index e939960..a43fe86 100644
--- a/base/src/portbase.cpp
+++ b/base/src/portbase.cpp
@@ -754,16 +754,20 @@
length = queue_length(&bufferq);
OMX_BUFFERHEADERTYPE *p;
/* remove returned buffer from the queue */
- for (OMX_U32 i = 0; i < length; i++) {
+ OMX_U32 i = 0;
+ for (i = 0; i < length; i++) {
p = (OMX_BUFFERHEADERTYPE *)queue_pop_head(&bufferq);
if (p == pReturn) {
break;
}
queue_push_tail(&bufferq, p);
}
-
pthread_mutex_unlock(&bufferq_lock);
+ if (i == length) {
+ return OMX_ErrorNone;
+ }
+
return ReturnThisBuffer(pReturn);
}