am 88de33b3: Fix "hardware/intel/common/wrs_omxil_core/base/src/portbase.cpp:599:15: error: \'ETIMEDOUT\' was not declared in this scope".

* commit '88de33b35c4ceac55d774896b5e3be26a5156b34':
  Fix "hardware/intel/common/wrs_omxil_core/base/src/portbase.cpp:599:15: error: 'ETIMEDOUT' was not declared in this scope".
diff --git a/base/src/Android.mk b/base/src/Android.mk
index 3e4e8e7..b16b8e9 100644
--- a/base/src/Android.mk
+++ b/base/src/Android.mk
@@ -1,8 +1,8 @@
 LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
-ifeq ($(TARGET_HAS_VPP),true)
-LOCAL_CFLAGS += -DTARGET_HAS_VPP
+ifeq ($(TARGET_HAS_ISV),true)
+LOCAL_CFLAGS += -DTARGET_HAS_ISV
 endif
 
 LOCAL_SRC_FILES := \
diff --git a/base/src/componentbase.cpp b/base/src/componentbase.cpp
index 3aec00b..e0f84c3 100644
--- a/base/src/componentbase.cpp
+++ b/base/src/componentbase.cpp
@@ -648,6 +648,15 @@
                         kMaxAdaptiveStreamingWidth, kMaxAdaptiveStreamingHeight);
                 return OMX_ErrorBadParameter;
             }
+
+            if (GetWorkingRole() != NULL &&
+                        !strcmp (GetWorkingRole(),"video_decoder.vp9")) {
+                if (p->nMaxFrameWidth < 640 && p->nMaxFrameHeight < 480) {
+                    p->nMaxFrameHeight = kMaxAdaptiveStreamingHeight;
+                    p->nMaxFrameWidth = kMaxAdaptiveStreamingWidth;
+                }
+            }
+
             mEnableAdaptivePlayback = p->bEnable;
             if (mEnableAdaptivePlayback != OMX_TRUE)
                 return OMX_ErrorBadParameter;
@@ -813,7 +822,7 @@
         return OMX_ErrorNone;
     }
 
-#ifdef TARGET_HAS_VPP
+#ifdef TARGET_HAS_ISV
     if (!strcmp(cParameterName, "OMX.Intel.index.vppBufferNum")) {
         *pIndexType = static_cast<OMX_INDEXTYPE>(OMX_IndexExtVppBufferNum);
         return OMX_ErrorNone;
diff --git a/base/src/portbase.cpp b/base/src/portbase.cpp
index efc90a2..de91e7c 100644
--- a/base/src/portbase.cpp
+++ b/base/src/portbase.cpp
@@ -755,16 +755,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);
 }
 
diff --git a/core/inc/khronos/openmax/include/OMX_IntelIndexExt.h b/core/inc/khronos/openmax/include/OMX_IntelIndexExt.h
index 1914662..c96ccb0 100644
--- a/core/inc/khronos/openmax/include/OMX_IntelIndexExt.h
+++ b/core/inc/khronos/openmax/include/OMX_IntelIndexExt.h
@@ -71,7 +71,7 @@
     OMX_IndexExtRequestBlackFramePointer,           /**<reference: OMX_VIDEO_INTEL_REQUEST_BALCK_FRAME_POINTER*/
 
     // Index for VPP must always be put at the end
-#ifdef TARGET_HAS_VPP
+#ifdef TARGET_HAS_ISV
     OMX_IndexExtVppBufferNum,                       /**<reference: vpp buffer number*/
 #endif
     OMX_IntelIndexExtMax = 0x7FFFFFFF