From 0b2ca4416acd33bdc61216245530ea7b907049a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Mon, 6 Jan 2014 19:12:21 +0000 Subject: [PATCH] It is possible to use ffmpeg with Visual Studio 2013 build by definining USE_FFMPEG macro. --- client/CVideoHandler.cpp | 10 +++++++++- client/CVideoHandler.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/CVideoHandler.cpp b/client/CVideoHandler.cpp index 4149f597e..0a5306364 100644 --- a/client/CVideoHandler.cpp +++ b/client/CVideoHandler.cpp @@ -21,7 +21,7 @@ static bool keyDown() return false; } -#ifdef _WIN32 +#if defined(_WIN32) && (_MSC_VER < 1800 || !defined(USE_FFMPEG)) void checkForError(bool throwing = true) { @@ -569,6 +569,14 @@ bool CVideoPlayer::playVideo(int x, int y, SDL_Surface *dst, bool stopOnKey) #else +#ifdef _MSC_VER +#pragma comment(lib, "avcodec.lib") +#pragma comment(lib, "avutil.lib") +#pragma comment(lib, "avformat.lib") +#pragma comment(lib, "swscale.lib") +#endif // _MSC_VER + + #ifndef DISABLE_VIDEO // Define a set of functions to read data diff --git a/client/CVideoHandler.h b/client/CVideoHandler.h index 76c096dc9..216faa027 100644 --- a/client/CVideoHandler.h +++ b/client/CVideoHandler.h @@ -43,7 +43,7 @@ public: }; -#ifdef _WIN32 +#if defined(_WIN32) && (_MSC_VER < 1800 || !defined(USE_FFMPEG)) #define WIN32_LEAN_AND_MEAN //excludes rarely used stuff from windows headers - delete this line if something is missing #include