From 14d27112e9856a0fd0af8c680071f038867cc721 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Thu, 14 Mar 2013 14:50:03 +0400 Subject: [PATCH] Fix build of ffmpeg wrapper with some versions of avutil --- modules/highgui/src/cap_ffmpeg_impl.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp index 870804dd88..dd9c47c544 100644 --- a/modules/highgui/src/cap_ffmpeg_impl.hpp +++ b/modules/highgui/src/cap_ffmpeg_impl.hpp @@ -45,6 +45,8 @@ #include #include +#define CALC_FFMPEG_VERSION(a,b,c) ( a<<16 | b<<8 | c ) + #if defined _MSC_VER && _MSC_VER >= 1200 #pragma warning( disable: 4244 4510 4512 4610 ) #endif @@ -61,9 +63,12 @@ extern "C" { #include +#if LIBAVUTIL_BUILD > CALC_FFMPEG_VERSION(51,11,0) + #include +#endif + #ifdef WIN32 #define HAVE_FFMPEG_SWSCALE 1 - #include #include #include #else @@ -124,7 +129,6 @@ extern "C" { #define PIX_FMT_RGBA32 PIX_FMT_RGB32 #endif -#define CALC_FFMPEG_VERSION(a,b,c) ( a<<16 | b<<8 | c ) #if defined WIN32 || defined _WIN32 #include