diff --git a/NEWS b/NEWS index 97be2092a..4e93c8926 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.23.4 (not yet released) +* decoder + - ffmpeg: support libavcodec 59 * output - alsa: add option "thesycon_dsd_workaround" to work around device bug * fix crash on debug builds if startup fails diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index c0ebc7b97..c44addeea 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -502,7 +502,7 @@ FfmpegDecode(DecoderClient &client, InputStream *input, FmtDebug(ffmpeg_domain, "codec '{}'", codec_descriptor->name); - AVCodec *codec = avcodec_find_decoder(codec_params.codec_id); + const AVCodec *codec = avcodec_find_decoder(codec_params.codec_id); if (!codec) { LogError(ffmpeg_domain, "Unsupported audio codec"); diff --git a/src/lib/ffmpeg/Codec.hxx b/src/lib/ffmpeg/Codec.hxx index bb038884f..2437950e5 100644 --- a/src/lib/ffmpeg/Codec.hxx +++ b/src/lib/ffmpeg/Codec.hxx @@ -36,7 +36,7 @@ class CodecContext { public: CodecContext() = default; - explicit CodecContext(AVCodec &codec) + explicit CodecContext(const AVCodec &codec) :codec_context(avcodec_alloc_context3(&codec)) { if (codec_context == nullptr)