aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-16 08:25:10 +0200
committerMax Kellermann <max@duempel.org>2014-08-16 08:25:10 +0200
commita9f65564547f40d43b6163734e6141668cd429bb (patch)
treefd4f7c333ab5e30d7dc21c97cf897e9d5846fc6b /src
parent2722211ba3d1760fc629059eae3dcec6aba0aabe (diff)
parent40280fa6cf7dc1e45724c3e965e1eeab03b3994e (diff)
downloadmpd-a9f65564547f40d43b6163734e6141668cd429bb.tar.gz
mpd-a9f65564547f40d43b6163734e6141668cd429bb.tar.xz
mpd-a9f65564547f40d43b6163734e6141668cd429bb.zip
Merge branch 'v0.18.x'
Diffstat (limited to 'src')
-rw-r--r--src/decoder/plugins/FfmpegDecoderPlugin.cxx9
-rw-r--r--src/util/ASCII.hxx2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
index 9139a622b..3c0747514 100644
--- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
@@ -452,9 +452,18 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
AVStream *av_stream = format_context->streams[audio_stream];
AVCodecContext *codec_context = av_stream->codec;
+
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 25, 0)
+ const AVCodecDescriptor *codec_descriptor =
+ avcodec_descriptor_get(codec_context->codec_id);
+ if (codec_descriptor != nullptr)
+ FormatDebug(ffmpeg_domain, "codec '%s'",
+ codec_descriptor->name);
+#else
if (codec_context->codec_name[0] != 0)
FormatDebug(ffmpeg_domain, "codec '%s'",
codec_context->codec_name);
+#endif
AVCodec *codec = avcodec_find_decoder(codec_context->codec_id);
diff --git a/src/util/ASCII.hxx b/src/util/ASCII.hxx
index adea6dceb..19a18a1bb 100644
--- a/src/util/ASCII.hxx
+++ b/src/util/ASCII.hxx
@@ -33,7 +33,7 @@
#include "Compiler.h"
#include <assert.h>
-#include <string.h>
+#include <strings.h>
/**
* Determine whether two strings are equal, ignoring case for ASCII