Commit 05de0ece authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

decoder/ffmpeg: call avcodec_parameters_to_context()

These bug reports describe problems with some FFmpeg codecs: https://bugs.musicpd.org/view.php?id=4564 https://bugs.musicpd.org/view.php?id=4568 https://bugs.musicpd.org/view.php?id=4572 According to the FFmpeg bug tracker, a call to avcodec_parameters_to_context() is required after avcodec_alloc_context3(): https://trac.ffmpeg.org/ticket/5781 This requirement was previously undocumented.
parent b05beb00
ver 0.19.19 (not yet released)
* decoder
- ffmpeg: bug fix for FFmpeg 3.1 support
- wildmidi: support libWildMidi 0.4
* output
- pulse: support 32 bit, 24 bit and floating point playback
......
......@@ -547,6 +547,8 @@ FfmpegDecode(Decoder &decoder, InputStream &input,
AtScopeExit(&codec_context) {
avcodec_free_context(&codec_context);
};
avcodec_parameters_to_context(codec_context, av_stream.codecpar);
#endif
const SampleFormat sample_format =
......
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