ports/graphics/blender/patches/patch-intern_ffmpeg_ffmpeg_compat_h

23 lines
823 B
Text

Fix: Build with FFmpeg 6.0
Index: intern/ffmpeg/ffmpeg_compat.h
--- intern/ffmpeg/ffmpeg_compat.h.orig
+++ intern/ffmpeg/ffmpeg_compat.h
@@ -36,6 +36,17 @@
# define FFMPEG_INLINE static inline
#endif
+/* AV_CODEC_CAP_AUTO_THREADS was renamed to AV_CODEC_CAP_OTHER_THREADS with
+ * upstream commit
+ * github.com/FFmpeg/FFmpeg/commit/7d09579190def3ef7562399489e628f3b65714ce
+ * (lavc 58.132.100) and removed with commit
+ * github.com/FFmpeg/FFmpeg/commit/10c9a0874cb361336237557391d306d26d43f137
+ * for ffmpeg 6.0.
+ */
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,132,100)
+# define AV_CODEC_CAP_OTHER_THREADS AV_CODEC_CAP_AUTO_THREADS
+#endif
+
#if (LIBAVFORMAT_VERSION_MAJOR < 58) || \
((LIBAVFORMAT_VERSION_MAJOR == 58) && (LIBAVFORMAT_VERSION_MINOR < 76))
# define FFMPEG_USE_DURATION_WORKAROUND 1