diff options
author | Arun Menon <avmenon@codeaurora.org> | 2015-11-12 18:34:30 -0800 |
---|---|---|
committer | Arun Menon <avmenon@codeaurora.org> | 2015-11-12 18:49:11 -0800 |
commit | b12f245a9a79ba0215a9963780c49b731be7923b (patch) | |
tree | fbbcc39d2de21366564c75b3c16dbd2ff4bc26ca | |
parent | 8ad80e2eee7d22e42f039abc56926ce669b13929 (diff) | |
download | android_hardware_qcom_media-b12f245a9a79ba0215a9963780c49b731be7923b.tar.gz android_hardware_qcom_media-b12f245a9a79ba0215a9963780c49b731be7923b.tar.bz2 android_hardware_qcom_media-b12f245a9a79ba0215a9963780c49b731be7923b.zip |
mm-video-v4l2: Handle async_message_thread error
Do not break from async_message_thread if poll() fails
and errno is either EINTR OR EAGAIN. Fix the issue
in both decoder and encoder.
Change-Id: I3c865797f12e9359756cb0e1ca98dc1e86284b64
-rw-r--r-- | mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp | 4 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp index 5b79be67..b790ea09 100644 --- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp +++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp @@ -172,8 +172,8 @@ void* async_message_thread (void *input) if (!rc) { DEBUG_PRINT_ERROR("Poll timedout"); break; - } else if (rc < 0) { - DEBUG_PRINT_ERROR("Error while polling: %d", rc); + } else if (rc < 0 && errno != EINTR && errno != EAGAIN) { + DEBUG_PRINT_ERROR("Error while polling: %d, errno = %d", rc, errno); break; } if ((pfds[1].revents & POLLIN) || (pfds[1].revents & POLLERR)) { 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..191b2151 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 @@ -357,8 +357,8 @@ void* venc_dev::async_venc_message_thread (void *input) DEBUG_PRINT_HIGH("Poll timedout, pipeline stalled due to client/firmware ETB: %d, EBD: %d, FTB: %d, FBD: %d", omx->handle->etb, omx->handle->ebd, omx->handle->ftb, omx->handle->fbd); continue; - } else if (rc < 0) { - DEBUG_PRINT_ERROR("Error while polling: %d", rc); + } else if (rc < 0 && errno != EINTR && errno != EAGAIN) { + DEBUG_PRINT_ERROR("Error while polling: %d, errno = %d", rc, errno); break; } |