From 7e72c4712bde3bde68d0f4310566800a38024dd4 Mon Sep 17 00:00:00 2001 From: "benjamin.drung@gmail.com" Date: Mon, 2 Jun 2014 21:35:48 +0000 Subject: [PATCH] Revert defining different headers depending on FFMPEG_VERSION. The preprocessor definition FFMPEG_VERSION cannot be used to determine whether the libav* header are provided by the FFmpeg or libav project. Therefore an own proprocessor definition is needed to make the differentiatiion. IS_FFMPEG_PROJECT should be set by configure instead of hard-coding it in FFmpeg.h. --- src/FFmpeg.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/FFmpeg.h b/src/FFmpeg.h index 1077fb381..285e82dfa 100644 --- a/src/FFmpeg.h +++ b/src/FFmpeg.h @@ -16,6 +16,10 @@ Describes shared object that is used to access FFmpeg libraries. #if !defined(__AUDACITY_FFMPEG__) #define __AUDACITY_FFMPEG__ +// TODO: Determine whether the libav* headers come from the FFmpeg or libav +// project and set IS_FFMPEG_PROJECT depending on it. +#define IS_FFMPEG_PROJECT 1 + /* FFmpeg is written in C99. It uses many types from stdint.h. Because we are * compiling this using a C++ compiler we have to put it in extern "C". * __STDC_CONSTANT_MACROS is defined to make behave like it @@ -585,7 +589,7 @@ extern "C" { (AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options), (avctx, codec, options); ); -#if defined(FFMPEG_VERSION) +#if defined(IS_FFMPEG_PROJECT) FFMPEG_FUNCTION_WITH_RETURN( int, avcodec_decode_audio4, @@ -691,7 +695,7 @@ extern "C" { (const AVCodec *c), (c) ); -#if defined(FFMPEG_VERSION) +#if defined(IS_FFMPEG_PROJECT) FFMPEG_FUNCTION_WITH_RETURN( AVStream*, avformat_new_stream,