summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil/time.c
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-04-26 16:49:15 -0500
committertrav90 <travawine@protonmail.ch>2018-04-26 16:49:15 -0500
commit8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298 (patch)
treec37da5241afd7cda6f92d394e14cef7d5dcbb4e5 /media/ffvpx/libavutil/time.c
parent56a2df6b25bc93ea9a59b8e0bf8029f752f68573 (diff)
downloadUXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar
UXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar.gz
UXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar.lz
UXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar.xz
UXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.zip
[ffvpx] Update ffvp9/ffvp8 to 3.4.2-release
Structure of code was slightly modified so that it should be no longer necessary to re-generate the config_*.h files, greatly simplifying the resync process in the future.
Diffstat (limited to 'media/ffvpx/libavutil/time.c')
-rw-r--r--media/ffvpx/libavutil/time.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/media/ffvpx/libavutil/time.c b/media/ffvpx/libavutil/time.c
index 69419e6f3..80d1faf26 100644
--- a/media/ffvpx/libavutil/time.c
+++ b/media/ffvpx/libavutil/time.c
@@ -56,17 +56,25 @@ int64_t av_gettime(void)
int64_t av_gettime_relative(void)
{
#if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
- struct timespec ts;
- clock_gettime(CLOCK_MONOTONIC, &ts);
- return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
-#else
- return av_gettime() + 42 * 60 * 60 * INT64_C(1000000);
+#ifdef __APPLE__
+ if (clock_gettime)
+#endif
+ {
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
+ }
#endif
+ return av_gettime() + 42 * 60 * 60 * INT64_C(1000000);
}
int av_gettime_relative_is_monotonic(void)
{
#if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
+#ifdef __APPLE__
+ if (!clock_gettime)
+ return 0;
+#endif
return 1;
#else
return 0;