1 |
commit: f2bb4173add20c89953f7c2f7f42f5f81d67bf45 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 25 02:35:38 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 25 02:35:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2bb4173 |
7 |
|
8 |
media-video/ffmpeg: fix USE=srt with >=net-libs/srt-1.4.2 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/756859 |
11 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
media-video/ffmpeg/ffmpeg-4.3.1.ebuild | 1 + |
15 |
.../files/ffmpeg-4.3.1-srt-1.4.2-build.patch | 52 ++++++++++++++++++++++ |
16 |
2 files changed, 53 insertions(+) |
17 |
|
18 |
diff --git a/media-video/ffmpeg/ffmpeg-4.3.1.ebuild b/media-video/ffmpeg/ffmpeg-4.3.1.ebuild |
19 |
index ad1f9fb2b88..cd228d62314 100644 |
20 |
--- a/media-video/ffmpeg/ffmpeg-4.3.1.ebuild |
21 |
+++ b/media-video/ffmpeg/ffmpeg-4.3.1.ebuild |
22 |
@@ -328,6 +328,7 @@ PATCHES=( |
23 |
"${FILESDIR}"/chromium-r1.patch |
24 |
"${FILESDIR}"/${PN}-4.3-fix-build-without-SSSE3.patch |
25 |
"${FILESDIR}"/${PN}-4.3-altivec-novsx-yuv2rgb.patch |
26 |
+ "${FILESDIR}"/${PN}-4.3.1-srt-1.4.2-build.patch |
27 |
) |
28 |
|
29 |
MULTILIB_WRAPPED_HEADERS=( |
30 |
|
31 |
diff --git a/media-video/ffmpeg/files/ffmpeg-4.3.1-srt-1.4.2-build.patch b/media-video/ffmpeg/files/ffmpeg-4.3.1-srt-1.4.2-build.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..691314cbacb |
34 |
--- /dev/null |
35 |
+++ b/media-video/ffmpeg/files/ffmpeg-4.3.1-srt-1.4.2-build.patch |
36 |
@@ -0,0 +1,52 @@ |
37 |
+http://git.videolan.org/?p=ffmpeg.git;a=patch;h=7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315 |
38 |
+https://bugs.gentoo.org/756859 |
39 |
+From 7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315 Mon Sep 17 00:00:00 2001 |
40 |
+From: Jun Zhao <barryjzhao@×××××××.com> |
41 |
+Date: Sun, 12 Jul 2020 13:48:48 +0800 |
42 |
+Subject: [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1 |
43 |
+ |
44 |
+libsrt changed the: |
45 |
+SRTO_SMOOTHER -> SRTO_CONGESTION |
46 |
+SRTO_STRICTENC -> SRTO_ENFORCEDENCRYPTION |
47 |
+and removed the front of deprecated options (SRTO_SMOOTHER/SRTO_STRICTENC) |
48 |
+in the header, it's lead to build fail |
49 |
+ |
50 |
+fix #8760 |
51 |
+ |
52 |
+Signed-off-by: Jun Zhao <barryjzhao@×××××××.com> |
53 |
+--- |
54 |
+ libavformat/libsrt.c | 8 ++++++++ |
55 |
+ 1 file changed, 8 insertions(+) |
56 |
+ |
57 |
+diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c |
58 |
+index 4de575b37c..4719ce0d4b 100644 |
59 |
+--- a/libavformat/libsrt.c |
60 |
++++ b/libavformat/libsrt.c |
61 |
+@@ -313,8 +313,12 @@ static int libsrt_set_options_pre(URLContext *h, int fd) |
62 |
+ (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) || |
63 |
+ (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) || |
64 |
+ #if SRT_VERSION_VALUE >= 0x010302 |
65 |
++#if SRT_VERSION_VALUE >= 0x010401 |
66 |
++ (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || |
67 |
++#else |
68 |
+ /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */ |
69 |
+ (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || |
70 |
++#endif |
71 |
+ (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) || |
72 |
+ (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) || |
73 |
+ #endif |
74 |
+@@ -333,7 +337,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd) |
75 |
+ (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) || |
76 |
+ (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) || |
77 |
+ (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) || |
78 |
++#if SRT_VERSION_VALUE >= 0x010401 |
79 |
++ (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) || |
80 |
++#else |
81 |
+ (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) || |
82 |
++#endif |
83 |
+ (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) || |
84 |
+ (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) || |
85 |
+ ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) { |
86 |
+-- |
87 |
+2.20.1 |
88 |
+ |