From 018ec33326f2962d4defc6ce757da96e1d8852ac Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Thu, 20 Jan 2022 11:25:24 +0100 Subject: [PATCH 1/2] FFmpeg: Delete obsolete libpostproc --- cmake/modules/FindFFMPEG.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake index 7316987c679..6924d07cae6 100644 --- a/cmake/modules/FindFFMPEG.cmake +++ b/cmake/modules/FindFFMPEG.cmake @@ -31,7 +31,6 @@ # libavformat # libavfilter # libavutil -# libpostproc # libswscale # libswresample # @@ -128,7 +127,6 @@ find_component(libavdevice libavdevice avdevice libavdevice/avdevice.h) find_component(libavutil libavutil avutil libavutil/avutil.h) find_component(libavfilter libavfilter avfilter libavfilter/avfilter.h) find_component(libswscale libswscale swscale libswscale/swscale.h) -find_component(libpostproc libpostproc postproc libpostproc/postprocess.h) find_component(libswresample libswresample swresample libswresample/swresample.h) set(FFMPEG_LIBRARIES "") From 73a780b88c380d6c9f0e729a7723800e100c552f Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Thu, 20 Jan 2022 11:38:11 +0100 Subject: [PATCH 2/2] Fix FFmpeg 5.0 build errors --- src/sources/soundsourceffmpeg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sources/soundsourceffmpeg.cpp b/src/sources/soundsourceffmpeg.cpp index e1b48196b21..8a8223b3250 100644 --- a/src/sources/soundsourceffmpeg.cpp +++ b/src/sources/soundsourceffmpeg.cpp @@ -518,7 +518,12 @@ SoundSource::OpenResult SoundSourceFFmpeg::tryOpen( } // Find the best stream +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 0, 100) + // https://github.com/FFmpeg/FFmpeg/blob/dd17c86aa11feae2b86de054dd0679cc5f88ebab/doc/APIchanges#L175 AVCodec* pDecoder = nullptr; +#else + const AVCodec* pDecoder = nullptr; +#endif const int av_find_best_stream_result = av_find_best_stream( m_pavInputFormatContext, AVMEDIA_TYPE_AUDIO,