public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
To: git-commits@fedoraproject.org
Subject: [rpms/opencv] opencv5: Fixed build with FFmpeg 8
Date: Fri, 28 Aug 2026 13:33:08 GMT [thread overview]
Message-ID: <178792398887.1.2558124015775425256.rpms-opencv-81d1bbe53c6a@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/opencv
Branch : opencv5
Commit : 81d1bbe53c6a431300f1f5f163d20bfd19d6e250
Author : Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date : 2025-10-20T16:29:01+02:00
Stats : +50/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/opencv/c/81d1bbe53c6a431300f1f5f163d20bfd19d6e250?branch=opencv5
Log:
Fixed build with FFmpeg 8
---
diff --git a/27691.patch b/27691.patch
new file mode 100644
index 0000000..c08b882
--- /dev/null
+++ b/27691.patch
@@ -0,0 +1,43 @@
+From 90c444abd387ffa70b2e72a34922903a2f0f4f5a Mon Sep 17 00:00:00 2001
+From: Alexander Smorkalov <alexander.smorkalov@opencv.ai>
+Date: Wed, 20 Aug 2025 10:53:51 +0300
+Subject: [PATCH] FFmpeg 8.0 support.
+
+---
+ modules/videoio/src/cap_ffmpeg_impl.hpp | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
+index 489dbe565d3d..5780b4c11361 100644
+--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
+@@ -685,7 +685,10 @@ void CvCapture_FFMPEG::close()
+ if( video_st )
+ {
+ #ifdef CV_FFMPEG_CODECPAR
++// avcodec_close removed in FFmpeg release 8.0
++# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(62, 11, 100))
+ avcodec_close( context );
++# endif
+ #endif
+ video_st = NULL;
+ }
+@@ -2005,7 +2008,18 @@ void CvCapture_FFMPEG::get_rotation_angle()
+ rotation_angle = 0;
+ #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(57, 68, 100)
+ const uint8_t *data = 0;
++ // av_stream_get_side_data removed in FFmpeg release 8.0
++# if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(62, 11, 100))
+ data = av_stream_get_side_data(video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL);
++# else
++ AVPacketSideData* sd = video_st->codecpar->coded_side_data;
++ int nb_sd = video_st->codecpar->nb_coded_side_data;
++ if (sd && nb_sd > 0)
++ {
++ const AVPacketSideData* mtx = av_packet_side_data_get(sd, nb_sd, AV_PKT_DATA_DISPLAYMATRIX);
++ data = mtx->data;
++ }
++# endif
+ if (data)
+ {
+ rotation_angle = -cvRound(av_display_rotation_get((const int32_t*)data));
diff --git a/opencv.spec b/opencv.spec
index 3bc6f39..6c1cc7e 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -75,7 +75,7 @@ Version: 4.11.0
%global minorver %(foo=%{version}; a=(${foo//./ }); echo ${a[1]} )
%global padding %(digits=00; num=%{minorver}; echo ${digits:${#num}:${#digits}} )
%global abiver %(echo %{majorver}%{padding}%{minorver} )
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: Collection of algorithms for computer vision
# This is normal three clause BSD.
License: BSD-3-Clause AND Apache-2.0 AND ISC
@@ -121,6 +121,8 @@ Patch15: 0010-Merge-pull-request-26915-from-mshabunin-fix-png-be.patch
# Fix build with Qt 6.9, by Atri Bhattacharya (thanks)
# https://github.com/opencv/opencv/issues/27223#issuecomment-2797750952
Patch16: qt69.patch
+# Fix build with FFmpeg 8
+Patch17: https://github.com/opencv/opencv/pull/27691.patch
BuildRequires: gcc-c++
@@ -434,6 +436,7 @@ popd &>/dev/null
%patch -P 14 -p1 -b .png9
%patch -P 15 -p1 -b .png10
%patch -P 16 -p1 -b .qt69
+%patch -P 17 -p1 -b .ffmpeg8
pushd %{name}_contrib-%{version}
#patch1 -p1 -b .install_cvv
@@ -634,6 +637,9 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/%{__cmake_builddir}/lib:$
%changelog
+* Fri Oct 17 2025 Dominik Mierzejewski <dominik@greysector.net> - 4.11.0-14
+- Fix build with FFmpeg 8
+
* Thu Oct 16 2025 Nicolas Chauvet <kwizart@gmail.com> - 4.11.0-13
- Use pyprojectize - thanks Miro !
reply other threads:[~2026-08-28 13:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178792398887.1.2558124015775425256.rpms-opencv-81d1bbe53c6a@fedoraproject.org \
--to=dominik@greysector.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox