From 5edf8ee973d41ec0377522d19b2c6d57f6fae0b6 Mon Sep 17 00:00:00 2001
From: Vittorio Giovara <vittorio.giovara@savoirfairelinux.com>
Date: Fri, 25 Apr 2014 13:53:11 -0400
Subject: [PATCH] video_decoder: use LIBAVUTIL_VERSION_CHECK to check libavutil
 features

Refs: #46175
Change-Id: I42a7f87f5c9250723a828536552c4b5bb5c69f83
---
 daemon/src/video/libav_deps.h      | 2 +-
 daemon/src/video/video_decoder.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/daemon/src/video/libav_deps.h b/daemon/src/video/libav_deps.h
index 5a66a8836b..dd938a2944 100644
--- a/daemon/src/video/libav_deps.h
+++ b/daemon/src/video/libav_deps.h
@@ -63,7 +63,7 @@ extern "C" {
 #include <libavdevice/avdevice.h>
 #include <libswscale/swscale.h>
 #include <libavutil/avutil.h>
-#if LIBAVFORMAT_VERSION_CHECK(54, 6, 0, 60, 100)
+#if LIBAVUTIL_VERSION_CHECK(51, 33, 0, 60, 100)
 #include <libavutil/time.h>
 #endif
 #include <libavutil/pixdesc.h>
diff --git a/daemon/src/video/video_decoder.cpp b/daemon/src/video/video_decoder.cpp
index f5600a0bd5..e403bcbee3 100644
--- a/daemon/src/video/video_decoder.cpp
+++ b/daemon/src/video/video_decoder.cpp
@@ -185,7 +185,7 @@ int VideoDecoder::decode(VideoFrame& result)
         const int64_t pts = av_rescale(lastDts_, 1000000, AV_TIME_BASE);
         const int64_t now = av_gettime() - startTime_;
         if (pts > now) {
-#if LIBAVFORMAT_VERSION_CHECK(54, 6, 0, 60, 100)
+#if LIBAVUTIL_VERSION_CHECK(51, 34, 0, 61, 100)
             av_usleep(10000);
 #else
             usleep(10000);
-- 
GitLab