diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f98fce05c..5a0792bde 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,6 @@ 0.96.10 +* added support for ffmpeg5 libraries. * fixed race condition in WasapiOut that caused the app to crash. * fixed `-rpath` for macOS build. diff --git a/src/plugins/ffmpegdecoder/FfmpegDecoder.cpp b/src/plugins/ffmpegdecoder/FfmpegDecoder.cpp index 99ab91ef1..424e0677a 100644 --- a/src/plugins/ffmpegdecoder/FfmpegDecoder.cpp +++ b/src/plugins/ffmpegdecoder/FfmpegDecoder.cpp @@ -314,7 +314,7 @@ bool FfmpegDecoder::Open(musik::core::sdk::IDataStream *stream) { if (this->formatContext->iformat) { if (avformat_open_input(&this->formatContext, "", nullptr, nullptr) == 0) { - AVCodec* codec = nullptr; + const AVCodec* codec = nullptr; if (avformat_find_stream_info(this->formatContext, nullptr) >= 0) { this->streamId = av_find_best_stream( this->formatContext, @@ -576,4 +576,4 @@ AVFrame* FfmpegDecoder::AllocFrame(AVFrame* original, AVSampleFormat format, int } } return original; -} \ No newline at end of file +} diff --git a/src/plugins/stockencoders/FfmpegEncoder.cpp b/src/plugins/stockencoders/FfmpegEncoder.cpp index a406b9f05..ebfdc0f60 100644 --- a/src/plugins/stockencoders/FfmpegEncoder.cpp +++ b/src/plugins/stockencoders/FfmpegEncoder.cpp @@ -89,7 +89,7 @@ static void logError(const std::string& message) { } } -static AVSampleFormat resolveSampleFormat(AVCodec *codec) { +static AVSampleFormat resolveSampleFormat(const AVCodec *codec) { if (!codec->sample_fmts) { return AV_SAMPLE_FMT_NONE; } @@ -105,7 +105,7 @@ static AVSampleFormat resolveSampleFormat(AVCodec *codec) { return codec->sample_fmts[0]; } -static int resolveSampleRate(AVCodec* codec, int preferredSampleRate) { +static int resolveSampleRate(const AVCodec* codec, int preferredSampleRate) { const int *p; int highestRate = 0; if (!codec->supported_samplerates) { @@ -634,4 +634,4 @@ AVFrame* FfmpegEncoder::ReallocFrame( return original; } -#endif // ENABLE_FFMPEG \ No newline at end of file +#endif // ENABLE_FFMPEG diff --git a/src/plugins/stockencoders/FfmpegEncoder.h b/src/plugins/stockencoders/FfmpegEncoder.h index d269e16c2..6f365bdf1 100644 --- a/src/plugins/stockencoders/FfmpegEncoder.h +++ b/src/plugins/stockencoders/FfmpegEncoder.h @@ -84,7 +84,7 @@ class FfmpegEncoder : public musik::core::sdk::IBlockingEncoder { IDataStream* out; int readBufferSize; AVAudioFifo* outputFifo; - AVCodec* outputCodec; + const AVCodec* outputCodec; AVCodecContext* outputContext; AVFormatContext* outputFormatContext; AVIOContext* ioContext; @@ -98,4 +98,4 @@ class FfmpegEncoder : public musik::core::sdk::IBlockingEncoder { int inputSampleRate; }; -#endif // ENABLE_FFMPEG \ No newline at end of file +#endif // ENABLE_FFMPEG