From 4204d4928be664377385f679b7c0915133238ade Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Aug 2016 10:14:59 +0200 Subject: [PATCH] decoder/ffmpeg: no avcodec_parameters_to_context() with FFmpeg 3.0 This function exists since FFmpeg 3.1. Fix a build failure with FFmpeg 3.0. --- src/decoder/plugins/FfmpegDecoderPlugin.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index ca1f3c0f8..e27ec797f 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -548,7 +548,9 @@ FfmpegDecode(Decoder &decoder, InputStream &input, avcodec_free_context(&codec_context); }; +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 25, 0) /* FFmpeg 3.1 */ avcodec_parameters_to_context(codec_context, av_stream.codecpar); +#endif #endif const SampleFormat sample_format =