diff options
author | Max Kellermann <max@duempel.org> | 2012-02-03 09:55:25 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-02-03 09:55:25 +0100 |
commit | 5d9876e33825e3ce526e480dc5311073078aba64 (patch) | |
tree | cf15e52260e7ddbbdc4f61bd41f255ca6ea4c63d /src/decoder/ffmpeg_decoder_plugin.c | |
parent | 083340a9373537faacf67cc2ba8bc82238e104c4 (diff) | |
download | mpd-5d9876e33825e3ce526e480dc5311073078aba64.tar.gz mpd-5d9876e33825e3ce526e480dc5311073078aba64.tar.xz mpd-5d9876e33825e3ce526e480dc5311073078aba64.zip |
decoder/ffmpeg: use AV_SAMPLE_FMT_* if available
Implements support for libavcodec 0.9, which removes the compatibility
macros SAMPLE_FMT_*
Diffstat (limited to 'src/decoder/ffmpeg_decoder_plugin.c')
-rw-r--r-- | src/decoder/ffmpeg_decoder_plugin.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c index b3c3744a1..52632dc4a 100644 --- a/src/decoder/ffmpeg_decoder_plugin.c +++ b/src/decoder/ffmpeg_decoder_plugin.c @@ -371,10 +371,18 @@ ffmpeg_sample_format(G_GNUC_UNUSED const AVCodecContext *codec_context) { #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(51, 41, 0) switch (codec_context->sample_fmt) { +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 94, 1) + case AV_SAMPLE_FMT_S16: +#else case SAMPLE_FMT_S16: +#endif return SAMPLE_FORMAT_S16; +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 94, 1) + case AV_SAMPLE_FMT_S32: +#else case SAMPLE_FMT_S32: +#endif return SAMPLE_FORMAT_S32; default: |