Diff between 12c8d6fdd4c8e8e3a8d81c93bf0cdc8d0f727e9c and f9f6dd4c58dd2fd06b7c22fb25bcd74ac4c2846c
Changed Files
| File | Additions | Deletions | Status |
| android/mcap-lib.c | +2 | -1 | modified |
Full Patch
diff --git a/android/mcap-lib.c b/android/mcap-lib.c
index 8e65bbd..f208fac 100644
--- a/android/mcap-lib.c
+++ b/android/mcap-lib.c
@@ -2442,7 +2442,8 @@ uint64_t mcap_get_timestamp(struct mcap_mcl *mcl,
if (given_time)
now = *given_time;
else
- clock_gettime(CLK, &now);
+ if (clock_gettime(CLK, &now) < 0)
+ return MCAP_TMSTAMP_DONTSET;
tmstamp = time_us(&now) - time_us(&mcl->csp->base_time)
+ mcl->csp->base_tmstamp;