diff --git a/science/paraview/files/patch-ffmpeg8-fix b/science/paraview/files/patch-ffmpeg8-fix new file mode 100644 index 000000000000..3ca69e2e746d --- /dev/null +++ b/science/paraview/files/patch-ffmpeg8-fix @@ -0,0 +1,36 @@ +Backport of upstream commits to fix build with FFmpeg 8. + +https://gitlab.kitware.com/vtk/vtk/-/commit/b8da15a0ec5157bd8405cbd9b5a95ecd29eb4bb7 +https://gitlab.kitware.com/vtk/vtk/-/commit/492a5cd59de5c045d1008d1c40ae1fa2301a5e6d + +--- VTK/IO/FFMPEG/vtkFFMPEGVideoSource.cxx.orig 2025-03-31 14:04:52 UTC ++++ VTK/IO/FFMPEG/vtkFFMPEGVideoSource.cxx +@@ -72,12 +72,16 @@ class vtkFFMPEGVideoSourceInternal (public) + } + if (this->VideoDecodeContext) + { ++#if defined(LIBAVCODEC_VERSION_MAJOR) && LIBAVCODEC_VERSION_MAJOR < 60 + avcodec_close(this->VideoDecodeContext); ++#endif + this->VideoDecodeContext = nullptr; + } + if (this->AudioDecodeContext) + { ++#if defined(LIBAVCODEC_VERSION_MAJOR) && LIBAVCODEC_VERSION_MAJOR < 60 + avcodec_close(this->AudioDecodeContext); ++#endif + this->AudioDecodeContext = nullptr; + } + if (this->FormatContext) +--- VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx.orig 2025-03-31 14:04:52 UTC ++++ VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx +@@ -363,7 +363,9 @@ void vtkFFMPEGWriterInternal::End() + + if (this->avCodecContext) + { ++#if defined(LIBAVCODEC_VERSION_MAJOR) && LIBAVCODEC_VERSION_MAJOR < 60 + avcodec_close(this->avCodecContext); ++#endif + avcodec_free_context(&this->avCodecContext); + this->avCodecContext = nullptr; + }