summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp')
-rw-r--r--media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp
index 5f80cbc..cd1ac36 100644
--- a/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp
+++ b/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp
@@ -517,6 +517,16 @@ const uint8_t *SoftVideoEncoderOMXComponent::extractGraphicBuffer(
// TODO do we need to support other formats?
srcStride *= 4;
}
+
+ if (nativeMeta.nFenceFd >= 0) {
+ sp<Fence> fence = new Fence(nativeMeta.nFenceFd);
+ nativeMeta.nFenceFd = -1;
+ status_t err = fence->wait(IOMX::kFenceTimeoutMs);
+ if (err != OK) {
+ ALOGE("Timed out waiting on input fence");
+ return NULL;
+ }
+ }
} else {
// TODO: remove this part. Check if anyone uses this.