Commit 4204d492 authored by Max Kellermann's avatar Max Kellermann

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.
parent 05de0ece
...@@ -548,8 +548,10 @@ FfmpegDecode(Decoder &decoder, InputStream &input, ...@@ -548,8 +548,10 @@ FfmpegDecode(Decoder &decoder, InputStream &input,
avcodec_free_context(&codec_context); 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); avcodec_parameters_to_context(codec_context, av_stream.codecpar);
#endif #endif
#endif
const SampleFormat sample_format = const SampleFormat sample_format =
ffmpeg_sample_format(GetSampleFormat(codec_params)); ffmpeg_sample_format(GetSampleFormat(codec_params));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment