From e864b8844cd25b57ff6e1893539df6b06c8c0f02 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Sat, 19 Apr 2014 00:02:07 +0300 Subject: demux_avformat: add support for older avformat versions --- src/combined/ffmpeg/demux_avformat.c | 9 +++++---- src/combined/ffmpeg/ffmpeg_compat.h | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/combined/ffmpeg/demux_avformat.c b/src/combined/ffmpeg/demux_avformat.c index 8a3561303..d73b491a2 100644 --- a/src/combined/ffmpeg/demux_avformat.c +++ b/src/combined/ffmpeg/demux_avformat.c @@ -46,6 +46,7 @@ #include "ff_video_list.h" #include "ff_audio_list.h" +#include "ffmpeg_compat.h" /* * avformat dummy input plugin */ @@ -305,13 +306,13 @@ static uint32_t audio_codec_lookup(avformat_demux_plugin_t *this, int id) { } switch (id) { - case AV_CODEC_ID_PCM_S16LE: + case CODEC_ID_PCM_S16LE: return BUF_AUDIO_LPCM_LE; - case AV_CODEC_ID_PCM_S16BE: + case CODEC_ID_PCM_S16BE: return BUF_AUDIO_LPCM_BE; - case AV_CODEC_ID_MP2: + case CODEC_ID_MP2: return BUF_AUDIO_MPEG; - case AV_CODEC_ID_AC3: + case CODEC_ID_AC3: return BUF_AUDIO_A52; } diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h index 016e13b4e..71b8798e2 100644 --- a/src/combined/ffmpeg/ffmpeg_compat.h +++ b/src/combined/ffmpeg/ffmpeg_compat.h @@ -173,6 +173,11 @@ # define CODEC_ID_MSMPEG4V3 AV_CODEC_ID_MSMPEG4V3 # define CODEC_ID_WMV1 AV_CODEC_ID_WMV1 # define CODEC_ID_WMV2 AV_CODEC_ID_WMV2 +/* demux_avformat */ +# define CODEC_ID_PCM_S16LE AV_CODEC_ID_PCM_S16LE +# define CODEC_ID_PCM_S16BE AV_CODEC_ID_PCM_S16BE +# define CODEC_ID_MP2 AV_CODEC_ID_MP2 +# define CODEC_ID_AC3 AV_CODEC_ID_AC3 /* ff_*_decoder mapping is already handled by mkcodeclists.pl */ #endif -- cgit v1.2.3