diff options
author | Max Kellermann <max@duempel.org> | 2011-06-03 16:58:09 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-06-03 16:58:09 +0200 |
commit | e228caaca62c8752d36ed8425b7f52809d34d348 (patch) | |
tree | 8e4b225f005e6c4d457f52b4d2fd97fac12a99b4 /src/decoder/ffmpeg_decoder_plugin.c | |
parent | 9ac8f89b1d8a0c2b4a9ba391ce174fbb3fa816e9 (diff) | |
parent | 4b4aa64261154bcb1e521b98629c0640d6b259f7 (diff) | |
download | mpd-e228caaca62c8752d36ed8425b7f52809d34d348.tar.gz mpd-e228caaca62c8752d36ed8425b7f52809d34d348.tar.xz mpd-e228caaca62c8752d36ed8425b7f52809d34d348.zip |
Merge branch 'v0.16.x'
Conflicts:
src/decoder/ffmpeg_decoder_plugin.c
Diffstat (limited to 'src/decoder/ffmpeg_decoder_plugin.c')
-rw-r--r-- | src/decoder/ffmpeg_decoder_plugin.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c index 757442a3b..5f11683a0 100644 --- a/src/decoder/ffmpeg_decoder_plugin.c +++ b/src/decoder/ffmpeg_decoder_plugin.c @@ -71,6 +71,11 @@ mpd_ffmpeg_log_callback(G_GNUC_UNUSED void *ptr, int level, } } + +#ifndef AV_VERSION_INT +#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c) +#endif + struct mpd_ffmpeg_stream { struct decoder *decoder; struct input_stream *input; @@ -154,7 +159,11 @@ ffmpeg_find_audio_stream(const AVFormatContext *format_context) { for (unsigned i = 0; i < format_context->nb_streams; ++i) if (format_context->streams[i]->codec->codec_type == +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0) + AVMEDIA_TYPE_AUDIO) +#else CODEC_TYPE_AUDIO) +#endif return i; return -1; |