diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-01-18 13:13:37 +0200 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-01-18 13:13:37 +0200 |
commit | 0c50f90e9a9172cfd850a0fe6e8d24cd9b378ab2 (patch) | |
tree | e646762599f2356c86746ffe09cd6be11abbf58f /src/combined/ffmpeg/ff_audio_decoder.c | |
parent | 003cfd21d5dd40a89094946f6377b3b686cf6d30 (diff) | |
download | xine-lib-0c50f90e9a9172cfd850a0fe6e8d24cd9b378ab2.tar.gz xine-lib-0c50f90e9a9172cfd850a0fe6e8d24cd9b378ab2.tar.bz2 |
Moved ffmpeg API version checks to single header
Diffstat (limited to 'src/combined/ffmpeg/ff_audio_decoder.c')
-rw-r--r-- | src/combined/ffmpeg/ff_audio_decoder.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c index e4a9c16bf..7ecf8290d 100644 --- a/src/combined/ffmpeg/ff_audio_decoder.c +++ b/src/combined/ffmpeg/ff_audio_decoder.c @@ -43,15 +43,10 @@ #include "xineutils.h" #include "bswap.h" #include "ffmpeg_decoder.h" +#include "ffmpeg_compat.h" #define AUDIOBUFSIZE (64 * 1024) -#if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 32) -# define AVAUDIO 3 -#else -# define AVAUDIO 2 -#endif - typedef struct { audio_decoder_class_t decoder_class; } ff_audio_class_t; @@ -173,7 +168,7 @@ static void ff_audio_init_codec(ff_audio_decoder_t *this, unsigned int codec_typ * - DVB streams where multiple AAC LATM frames are packed to single PES * - DVB streams where MPEG audio frames do not follow PES packet boundaries */ -#if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 94) +#if AVPARSE > 1 if (codec_type == BUF_AUDIO_AAC_LATM || codec_type == BUF_AUDIO_MPEG) { @@ -356,7 +351,7 @@ static int ff_audio_decode(xine_t *xine, int consumed; int parser_consumed = 0; -#if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 94) +#if AVPARSE > 1 if (parser_ctx) { uint8_t *outbuf; int outsize; @@ -383,7 +378,7 @@ static int ff_audio_decode(xine_t *xine, buf = outbuf; size = outsize; } -#endif /* LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 94) */ +#endif /* AVPARSE > 1 */ #if AVAUDIO > 2 AVPacket avpkt; |