From 8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298 Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 26 Apr 2018 16:49:15 -0500 Subject: [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. --- media/ffvpx/libavutil/time.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'media/ffvpx/libavutil/time.c') 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; -- cgit v1.2.3