summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPraveen Chavan <pchavan@codeaurora.org>2014-10-15 00:05:37 -0700
committerLajos Molnar <lajos@google.com>2014-10-15 16:26:01 -0700
commit8f8a54aad809df7e94c0af2991be0bc4b542d0e5 (patch)
treeaa1f5a88fbcd5aecc0c7d1b0a73421ae878383ae
parentc4621b88c8287714ce911fabcbd22494d4f24869 (diff)
downloadmedia-lollipop-dev.tar.gz
mm-video-v4l2: venc: do not send duplicate EBDs in case of an errorlollipop-dev
In case of an error pushing the input to device layer via push_input_buffer, EBDs are signalled locally. Do not send EBD again from the calling method as this will result in a duplicate EBD. Bug: 17784012 Change-Id: I20fd48dba6daad4db64d7e7c26b3bc2a5cff85a7
-rwxr-xr-xmm-video-v4l2/vidc/venc/src/omx_video_base.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
index e7cd0fb..179d630 100755
--- a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
@@ -3975,7 +3975,7 @@ OMX_ERRORTYPE omx_video::empty_buffer_done(OMX_HANDLETYPE hComp,
pending_input_buffers--;
- if (mUseProxyColorFormat && (buffer_index < (int)m_sInPortDef.nBufferCountActual)) {
+ if (mUseProxyColorFormat && ((OMX_U32)buffer_index < m_sInPortDef.nBufferCountActual)) {
if (!pdest_frame && !input_flush_progress) {
pdest_frame = buffer;
DEBUG_PRINT_LOW("empty_buffer_done pdest_frame address is %p",pdest_frame);
@@ -4536,13 +4536,10 @@ OMX_ERRORTYPE omx_video::empty_this_buffer_opaque(OMX_IN OMX_HANDLETYPE hComp,
} else {
if (!m_opq_meta_q.insert_entry((unsigned long)buffer,0,0)) {
DEBUG_PRINT_ERROR("ERROR: ETBProxy: Queue is full");
+ m_pCallbacks.EmptyBufferDone(hComp,m_app_data,buffer);
ret = OMX_ErrorBadParameter;
}
}
- if (ret != OMX_ErrorNone) {
- m_pCallbacks.EmptyBufferDone(hComp,m_app_data,buffer);
- DEBUG_PRINT_LOW("ERROR: ETBOpaque failed:");
- }
return ret;
}
@@ -4576,6 +4573,9 @@ OMX_ERRORTYPE omx_video::queue_meta_buffer(OMX_HANDLETYPE hComp,
m_opq_meta_q.pop_entry(&address,&p2,&id);
psource_frame = (OMX_BUFFERHEADERTYPE* ) address;
}
+ } else {
+ // there has been an error and source frame has been scheduled for an EBD
+ psource_frame = NULL;
}
return ret;
}
@@ -4660,6 +4660,9 @@ OMX_ERRORTYPE omx_video::convert_queue_buffer(OMX_HANDLETYPE hComp,
pdest_frame = (OMX_BUFFERHEADERTYPE* ) address;
DEBUG_PRINT_LOW("pdest_frame pop address is %p",pdest_frame);
}
+ } else {
+ // there has been an error and source frame has been scheduled for an EBD
+ psource_frame = NULL;
}
return ret;
}