commit | b7c00502628d3ff7c1de64460dfe92b7613a2559 | [log] [tgz] |
---|---|---|
author | Sungtak Lee <taklee@google.com> | Sat Mar 26 09:52:09 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Sat Mar 26 09:52:09 2022 +0000 |
tree | 29e1cb05e6b1087fca793f8150630138cc0d3dba | |
parent | 216d218724c2b97f3f70504c2d76d636c3ede604 [diff] | |
parent | 48b85bf9cc659d98768eff8262279e1d31801659 [diff] |
Merge "Codec2: Check errno during syscall (FUTEX_WAIT) failure in fence.wait" am: 49570ff4d9 am: b6a26b200e am: 48b85bf9cc Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2020815 Change-Id: I7c15d001be5cca5ff7f09adcca24bf7f43ba32ec Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/media/codec2/vndk/platform/C2SurfaceSyncObj.cpp b/media/codec2/vndk/platform/C2SurfaceSyncObj.cpp index e55bdc0..2115cc3 100644 --- a/media/codec2/vndk/platform/C2SurfaceSyncObj.cpp +++ b/media/codec2/vndk/platform/C2SurfaceSyncObj.cpp
@@ -228,10 +228,10 @@ tv.tv_nsec = timeoutNs % 1000000000; int ret = syscall(__NR_futex, &mCond, FUTEX_WAIT, waitId, &tv, NULL, 0); - if (ret == 0 || ret == EAGAIN) { + if (ret == 0 || errno == EAGAIN) { return C2_OK; } - if (ret == EINTR || ret == ETIMEDOUT) { + if (errno == EINTR || errno == ETIMEDOUT) { return C2_TIMED_OUT; } return C2_BAD_VALUE;