Commit 5edf8ee9 authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Tristan Matthews

video_decoder: use LIBAVUTIL_VERSION_CHECK to check libavutil features

Refs: #46175
Change-Id: I42a7f87f5c9250723a828536552c4b5bb5c69f83
parent 9d125a5e
...@@ -63,7 +63,7 @@ extern "C" { ...@@ -63,7 +63,7 @@ extern "C" {
#include <libavdevice/avdevice.h> #include <libavdevice/avdevice.h>
#include <libswscale/swscale.h> #include <libswscale/swscale.h>
#include <libavutil/avutil.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> #include <libavutil/time.h>
#endif #endif
#include <libavutil/pixdesc.h> #include <libavutil/pixdesc.h>
......
...@@ -185,7 +185,7 @@ int VideoDecoder::decode(VideoFrame& result) ...@@ -185,7 +185,7 @@ int VideoDecoder::decode(VideoFrame& result)
const int64_t pts = av_rescale(lastDts_, 1000000, AV_TIME_BASE); const int64_t pts = av_rescale(lastDts_, 1000000, AV_TIME_BASE);
const int64_t now = av_gettime() - startTime_; const int64_t now = av_gettime() - startTime_;
if (pts > now) { if (pts > now) {
#if LIBAVFORMAT_VERSION_CHECK(54, 6, 0, 60, 100) #if LIBAVUTIL_VERSION_CHECK(51, 34, 0, 61, 100)
av_usleep(10000); av_usleep(10000);
#else #else
usleep(10000); usleep(10000);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment