]> git.pld-linux.org Git - packages/ffmpeg.git/commitdiff
- added srt-1.4.1 patch (fixes srt 1.4.1+ compatibility) auto/th/ffmpeg-4.3.1-1.1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 17 Jan 2021 10:43:34 +0000 (11:43 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 17 Jan 2021 10:43:34 +0000 (11:43 +0100)
- bootstrap release 1.1

ffmpeg-srt-1.4.1.patch [new file with mode: 0644]
ffmpeg.spec

diff --git a/ffmpeg-srt-1.4.1.patch b/ffmpeg-srt-1.4.1.patch
new file mode 100644 (file)
index 0000000..4495511
--- /dev/null
@@ -0,0 +1,50 @@
+From 7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315 Mon Sep 17 00:00:00 2001
+From: Jun Zhao <barryjzhao@tencent.com>
+Date: Sun, 12 Jul 2020 13:48:48 +0800
+Subject: [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1
+
+libsrt changed the:
+SRTO_SMOOTHER   -> SRTO_CONGESTION
+SRTO_STRICTENC  -> SRTO_ENFORCEDENCRYPTION
+and removed the front of deprecated options (SRTO_SMOOTHER/SRTO_STRICTENC)
+in the header, it's lead to build fail
+
+fix #8760
+
+Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
+---
+ libavformat/libsrt.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
+index 4de575b37c..4719ce0d4b 100644
+--- a/libavformat/libsrt.c
++++ b/libavformat/libsrt.c
+@@ -313,8 +313,12 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
+         (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) ||
+         (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
+ #if SRT_VERSION_VALUE >= 0x010302
++#if SRT_VERSION_VALUE >= 0x010401
++        (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
++#else
+         /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */
+         (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
++#endif
+         (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) ||
+         (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) ||
+ #endif
+@@ -333,7 +337,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
+         (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) ||
+         (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) ||
+         (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) ||
++#if SRT_VERSION_VALUE >= 0x010401
++        (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) ||
++#else
+         (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) ||
++#endif
+         (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) ||
+         (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) ||
+         ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) {
+-- 
+2.20.1
+
index daccb93ec0275392a75f4b157eec1423c18e397d..329b7c37a98119062a5f1d641bb47798ee1f690b 100644 (file)
@@ -112,7 +112,7 @@ Summary:    FFmpeg - a very fast video and audio converter
 Summary(pl.UTF-8):     FFmpeg - szybki konwerter audio/wideo
 Name:          ffmpeg
 Version:       4.3.1
-Release:       1
+Release:       1.1
 # LGPL or GPL, chosen at configure time (GPL version is more featured)
 # GPL: frei0r libcdio libdavs2 rubberband vidstab x264 x265 xavs xavs2 xvid
 # v3 (allows *GPLv3 or Apache-licensed libs): gmp lensfun opencore-amr vmaf vo-*enc rkmpp
@@ -123,6 +123,7 @@ Source0:    http://ffmpeg.org/releases/%{name}-%{version}.tar.xz
 # Source0-md5: 5d1956bb552e91dc3b8287db346d0d58
 Patch0:                %{name}-omx-libnames.patch
 Patch1:                %{name}-atadenoise.patch
+Patch2:                %{name}-srt-1.4.1.patch
 URL:           http://www.ffmpeg.org/
 %{?with_decklink:BuildRequires:        Blackmagic_DeckLink_SDK >= 10.9.5}
 %{?with_openal:BuildRequires:  OpenAL-devel >= 1.1}
@@ -514,6 +515,7 @@ Dokumentacja pakietu FFmpeg w formacie HTML.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # package the grep result for mplayer, the result formatted as ./mplayer/configure
 cat <<EOF > ffmpeg-avconfig
This page took 0.268766 seconds and 4 git commands to generate.