void-packages/srcpkgs/ppsspp/patches/ffmpeg6.patch

16 lines
650 B
Diff

--- a/Core/HW/SimpleAudioDec.cpp 2024-02-04 08:08:02.000000000 -0500
+++ b/Core/HW/SimpleAudioDec.cpp 2024-02-15 14:48:27.114362051 -0500
@@ -81,7 +81,11 @@
return;
}
// Find decoder
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 18, 100)
codec_ = avcodec_find_decoder((AVCodecID)audioCodecId);
+#else // this is a macro to const in the header
+ codec_ = (AVCodec*)avcodec_find_decoder((AVCodecID)audioCodecId);
+#endif
if (!codec_) {
// Eh, we shouldn't even have managed to compile. But meh.
ERROR_LOG(ME, "This version of FFMPEG does not support AV_CODEC_ctx for audio (%s). Update your submodule.", GetCodecName(audioType));