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.
This commit is contained in:
Max Kellermann 2016-08-23 10:14:59 +02:00
parent 05de0ecec3
commit 4204d4928b
1 changed files with 2 additions and 0 deletions

View File

@ -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 =