From 19e1b47ddbf2cfefed9907e06c9454ea2187711d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 4 Nov 2018 15:59:42 +0200 Subject: [PATCH] Fixed: Compiling under windows --HG-- branch : develop --- code/nel/src/sound/CMakeLists.txt | 2 +- code/nel/src/sound/audio_decoder_ffmpeg.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/nel/src/sound/CMakeLists.txt b/code/nel/src/sound/CMakeLists.txt index f0417754c..7b9eebc9f 100644 --- a/code/nel/src/sound/CMakeLists.txt +++ b/code/nel/src/sound/CMakeLists.txt @@ -3,7 +3,7 @@ FILE(GLOB HEADERS ../../include/nel/sound/*.h) IF(NOT FFMPEG_FOUND) LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/audio_decoder_ffmpeg.cpp) - LIST(REMOVE_ITEM HEADERS ${CMAKE_CURRENT_SOURCE_DIR}../../include/nel/sound/audio_decoder_ffmpeg.h) + LIST(REMOVE_ITEM HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../../include/nel/sound/audio_decoder_ffmpeg.h) ENDIF() FILE(GLOB ANIMATION diff --git a/code/nel/src/sound/audio_decoder_ffmpeg.cpp b/code/nel/src/sound/audio_decoder_ffmpeg.cpp index 50acb17cc..dea8368d2 100644 --- a/code/nel/src/sound/audio_decoder_ffmpeg.cpp +++ b/code/nel/src/sound/audio_decoder_ffmpeg.cpp @@ -26,10 +26,15 @@ extern "C" #include #include #include -}; +} using namespace std; using namespace NLMISC; +using namespace NLSOUND; + +// Visual Studio does not support AV_TIME_BASE_Q macro in C++ +#undef AV_TIME_BASE_Q +static const AVRational AV_TIME_BASE_Q = {1, AV_TIME_BASE}; namespace {