git: 5c30d210fe2e - main - science/paraview: Fix build with FFMpeg 8
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 26 Dec 2025 09:21:13 UTC
The branch main has been updated by jhale:
URL: https://cgit.FreeBSD.org/ports/commit/?id=5c30d210fe2e28ef87beced679051f452d5c34ea
commit 5c30d210fe2e28ef87beced679051f452d5c34ea
Author: Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2025-12-26 09:18:13 +0000
Commit: Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-12-26 09:18:13 +0000
science/paraview: Fix build with FFMpeg 8
Backport upstream commits from VTK to fix build with FFMpeg 8.
Approved by: portmgr (blanket)
---
science/paraview/files/patch-ffmpeg8-fix | 36 ++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
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;
+ }