[packages/kp5-kpipewire] - rel 4, fix building with ffmpeg 9
baggins
baggins at pld-linux.org
Fri Oct 23 23:18:55 CEST 2026
commit 23e555fad4c0569ec4b2999f8e4cb4145da9e517
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Fri Oct 23 23:18:32 2026 +0200
- rel 4, fix building with ffmpeg 9
ffmpeg9.patch | 33 +++++++++++++++++++++++++++++++++
kp5-kpipewire.spec | 4 +++-
2 files changed, 36 insertions(+), 1 deletion(-)
---
diff --git a/kp5-kpipewire.spec b/kp5-kpipewire.spec
index d7e3927..b471b9f 100644
--- a/kp5-kpipewire.spec
+++ b/kp5-kpipewire.spec
@@ -9,11 +9,12 @@ Summary: A set of convenient classes to use PipeWire in Qt projects
Summary(pl.UTF-8): Zbiór wygodnych klas do używania PipeWire w projektach Qt
Name: kp5-%{kpname}
Version: 5.27.12
-Release: 3
+Release: 4
License: GPL v2+/LGPL v2.1+
Group: X11/Libraries
Source0: https://download.kde.org/stable/plasma/%{kdeplasmaver}/%{kpname}-%{version}.tar.xz
# Source0-md5: e45f9c407bb8af0d961b75e646de5e74
+Patch0: ffmpeg9.patch
URL: https://kde.org/
BuildRequires: Mesa-libgbm-devel
BuildRequires: Qt5DBus-devel >= %{qtver}
@@ -63,6 +64,7 @@ Pliki nagłówkowe dla programistów używających %{kpname}.
%prep
%setup -q -n %{kpname}-%{version}
+%patch -P0 -p1
%build
%cmake -B build \
diff --git a/ffmpeg9.patch b/ffmpeg9.patch
new file mode 100644
index 0000000..00b6f7a
--- /dev/null
+++ b/ffmpeg9.patch
@@ -0,0 +1,33 @@
+--- kpipewire-5.27.12/src/pipewirerecord.cpp~ 2025-01-06 18:56:26.000000000 +0100
++++ kpipewire-5.27.12/src/pipewirerecord.cpp 2026-10-23 23:11:19.257464877 +0200
+@@ -242,7 +242,7 @@
+ qCDebug(PIPEWIRERECORD_LOGGING) << "finished";
+ if (m_avCodecContext) {
+ avio_closep(&m_avFormatContext->pb);
+- avcodec_close(m_avCodecContext);
++ avcodec_free_context(&m_avCodecContext);
+ av_free(m_avCodecContext);
+ avformat_free_context(m_avFormatContext);
+ }
+@@ -301,8 +301,10 @@
+ m_avCodecContext->height = size.height();
+ m_avCodecContext->max_b_frames = 1;
+ m_avCodecContext->gop_size = 100;
+- if (m_codec->pix_fmts && m_codec->pix_fmts[0] > 0) {
+- m_avCodecContext->pix_fmt = m_codec->pix_fmts[0];
++ const enum AVPixelFormat* codec_pix_fmts = NULL;
++ avcodec_get_supported_config(NULL, m_codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&codec_pix_fmts, NULL);
++ if (codec_pix_fmts && codec_pix_fmts[0] > 0) {
++ m_avCodecContext->pix_fmt = codec_pix_fmts[0];
+ } else {
+ m_avCodecContext->pix_fmt = AV_PIX_FMT_YUV420P;
+ }
+@@ -555,7 +555,7 @@
+
+ // Let's add a key frame every 100 frames and also the first frame
+ if (sequential && (*sequential == 0 || (*sequential - m_lastKeyFrame) > 100)) {
+- avFrame.m_avFrame->key_frame = 1;
++ avFrame.m_avFrame->flags |= AV_FRAME_FLAG_KEY;
+ m_lastKeyFrame = *sequential;
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kp5-kpipewire.git/commitdiff/23e555fad4c0569ec4b2999f8e4cb4145da9e517
More information about the pld-cvs-commit
mailing list