From ba3b7a9dbcda22a03abaed5767ea2d21ef3e9639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 11 Oct 2024 18:21:26 +0100 Subject: [PATCH] Apply FFMPEG-7 only on Fedora 41+ --- 0001-Add-compatibility-with-FFMPEG-7.0.patch | 11 ----------- xpra.spec | 7 ++++++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/0001-Add-compatibility-with-FFMPEG-7.0.patch b/0001-Add-compatibility-with-FFMPEG-7.0.patch index dfb37d8..d01a792 100644 --- a/0001-Add-compatibility-with-FFMPEG-7.0.patch +++ b/0001-Add-compatibility-with-FFMPEG-7.0.patch @@ -125,14 +125,6 @@ index 6af88a5629..5df0c590c0 100644 global GEN_TO_ENCODER encoder = GEN_TO_ENCODER.get( opaque) #log.warn("write_packet(%#x, %#x, %#x) encoder=%s", opaque, buf, buf_size, type(encoder)) -@@ -1146,6 +1158,7 @@ cdef int write_packet(void *opaque, uint8_t *buf, int buf_size) except 0: - return -1 - return encoder.write_packet( buf, buf_size) - -+ - MAX_WIDTH, MAX_HEIGHT = (4096, 4096) - def get_specs(encoding, colorspace): - assert encoding in get_encodings(), "invalid encoding: %s (must be one of %s" % (encoding, get_encodings()) @@ -1504,7 +1517,7 @@ cdef class Encoder: self.audio_ctx.time_base.num = 1 self.audio_ctx.bit_rate = 64000 @@ -162,6 +154,3 @@ index 6af88a5629..5df0c590c0 100644 return buf_size -- 2.44.0 - ---- xpra/codecs/ffmpeg/decoder.pyx.orig 2024-10-11 13:55:29.562576235 +0100 -+++ xpra/codecs/ffmpeg/decoder.pyx 2024-10-11 14:00:42.835059698 +0100 diff --git a/xpra.spec b/xpra.spec index 7d8f4db..89c4b46 100644 --- a/xpra.spec +++ b/xpra.spec @@ -182,7 +182,12 @@ Xpra is usable over reasonably slow links and does its best to adapt to changing network bandwidth constraints. %prep -%autosetup -p1 -n %{name}-%{version} +%setup -q -n %{name}-%{version} + +%patch -P1 -p1 +%if 0%{?fedora} >= 41 +%patch -P2 -p1 +%endif # cc1: error: unrecognized compiler option ‘-mfpmath=387’ %ifarch %{arm}