summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-11-12 22:04:51 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-11-12 22:04:51 -0800
commit4c87b6599b942d86d9c757e391f39bc8d66811e6 (patch)
tree6540c431df42ab0b95a4b5c27ef288e9edc3ac30
parentab6c500a49ae01fec0e3fa6e7499948f680fa54e (diff)
parentcf6d469cf85eebbcec7789c16708a85334b699b4 (diff)
downloadandroid_hardware_qcom_media-4c87b6599b942d86d9c757e391f39bc8d66811e6.tar.gz
android_hardware_qcom_media-4c87b6599b942d86d9c757e391f39bc8d66811e6.tar.bz2
android_hardware_qcom_media-4c87b6599b942d86d9c757e391f39bc8d66811e6.zip
Merge "mm-video: vidc: Fully drainbuffers from the driver if batch not complete"
-rw-r--r--mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
index 56e8f951..78d6a4ad 100644
--- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
+++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
@@ -431,6 +431,7 @@ void* venc_dev::async_venc_message_thread (void *input)
while (!ioctl(pfds[0].fd, VIDIOC_DQBUF, &v4l2_buf)) {
venc_msg.msgcode=VEN_MSG_INPUT_BUFFER_DONE;
venc_msg.statuscode=VEN_S_SUCCESS;
+ omx->handle->ebd++;
if (omx->handle->mBatchSize) {
int bufIndex = omx->handle->mBatchInfo.retrieveBufferAt(v4l2_buf.index);
@@ -442,7 +443,7 @@ void* venc_dev::async_venc_message_thread (void *input)
DEBUG_PRINT_LOW(" EBD for %d [v4l2-id=%d].. batch still pending",
bufIndex, v4l2_buf.index);
//do not return to client yet
- break;
+ continue;
}
v4l2_buf.index = bufIndex;
}
@@ -460,7 +461,6 @@ void* venc_dev::async_venc_message_thread (void *input)
}
venc_msg.buf.clientdata=(void*)omxhdr;
- omx->handle->ebd++;
DEBUG_PRINT_LOW("sending EBD %p [id=%d]", omxhdr, v4l2_buf.index);
if (omx->async_message_process(input,&venc_msg) < 0) {