aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-05-09 07:57:46 +0200
committerMax Kellermann <max@duempel.org>2011-05-09 08:00:45 +0200
commit05d8ce3bcd6e19843dabf822264c2be4582c71b2 (patch)
tree3ca4420614b36e600ec87c5d19a2523982817153 /src/decoder
parentdef2fe8805d575c4be403f1c28aac70d87759d55 (diff)
downloadmpd-05d8ce3bcd6e19843dabf822264c2be4582c71b2.tar.gz
mpd-05d8ce3bcd6e19843dabf822264c2be4582c71b2.tar.xz
mpd-05d8ce3bcd6e19843dabf822264c2be4582c71b2.zip
decoder/ffmpeg: define fallback macro AV_VERSION_INT()
For ffmpeg < 0.5. Copied from libavutil 0.5.
Diffstat (limited to '')
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index f9d4eb8a9..29f476ba7 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -81,6 +81,10 @@ mpd_ffmpeg_log_callback(G_GNUC_UNUSED void *ptr, int level,
#endif /* !OLD_FFMPEG_INCLUDES */
+#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;
@@ -230,7 +234,7 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
static enum sample_format
ffmpeg_sample_format(G_GNUC_UNUSED const AVCodecContext *codec_context)
{
-#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(41<<8)+0)
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(51, 41, 0)
switch (codec_context->sample_fmt) {
case SAMPLE_FMT_S16:
return SAMPLE_FORMAT_S16;