summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/OMXCodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 644c413..27dfeab 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -3199,9 +3199,16 @@ void OMXCodec::setState(State newState) {
}
status_t OMXCodec::waitForBufferFilled_l() {
+
+ if (mIsEncoder) {
+ // For timelapse video recording, the timelapse video recording may
+ // not send an input frame for a _long_ time. Do not use timeout
+ // for video encoding.
+ return mBufferFilled.wait(mLock);
+ }
status_t err = mBufferFilled.waitRelative(mLock, kBufferFilledEventTimeOutUs);
if (err != OK) {
- LOGE("Timed out waiting for buffers from video encoder: %d/%d",
+ CODEC_LOGE("Timed out waiting for output buffers: %d/%d",
countBuffersWeOwn(mPortBuffers[kPortIndexInput]),
countBuffersWeOwn(mPortBuffers[kPortIndexOutput]));
}