summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Demers2020-09-28 11:28:07 -0400
committerAlexandre Demers2020-09-28 11:28:07 -0400
commit8be109fc2ba97a40ba9ad28ff314bc919adf6780 (patch)
tree92df075a9d00d065fca899c24bd2e0f6230b4e35
parent92eeaf1f1dfea486ff44d7069229d32051ae21af (diff)
downloadaur-8be109fc2ba97a40ba9ad28ff314bc919adf6780.tar.gz
Fix issue 8760 - building against libstr 1.4.1 and newer
Some deprecated functions were removed and FFMPEG was not updated in time. Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD5
-rw-r--r--issue8760-fix-libsrt-1.4.1.patch47
3 files changed, 54 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d3e6cebe20a..e043ff814df 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = lib32-ffmpeg
pkgdesc = Complete solution to record, convert and stream audio and video (32 bit)
pkgver = 4.3.1
- pkgrel = 3
+ pkgrel = 4
epoch = 2
url = http://ffmpeg.org/
arch = x86_64
@@ -61,9 +61,11 @@ pkgbase = lib32-ffmpeg
optdepends = lib32-nvidia-utils: Nvidia NVDEC/NVENC support
source = git+https://git.ffmpeg.org/ffmpeg.git#tag=n4.3.1
source = vmaf-model-path.patch
+ source = issue8760-fix-libsrt-1.4.1.patch
validpgpkeys = FCF986EA15E6E293A5644F10B4322F04D67658D8
sha256sums = SKIP
sha256sums = 8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d
+ sha256sums = d19626d3b803e2985b8114ab3f79c149420d5054491c282ca71f50f1934c579e
pkgname = lib32-ffmpeg
pkgdesc = Complete solution to record, convert and stream audio and video (32 bit)
diff --git a/PKGBUILD b/PKGBUILD
index 13066347002..ec1adcb911a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
_pkgbasename=ffmpeg
pkgname=("lib32-$_pkgbasename" "lib32-lib$_pkgbasename")
pkgver=4.3.1
-pkgrel=3
+pkgrel=4
epoch=2
pkgdesc="Complete solution to record, convert and stream audio and video (32 bit)"
arch=('x86_64')
@@ -83,11 +83,13 @@ optdepends=(
source=(
"git+https://git.ffmpeg.org/ffmpeg.git#tag=n${pkgver}"
"vmaf-model-path.patch"
+ "issue8760-fix-libsrt-1.4.1.patch"
)
validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8')
sha256sums=(
'SKIP'
'8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d'
+ 'd19626d3b803e2985b8114ab3f79c149420d5054491c282ca71f50f1934c579e'
)
prepare() {
@@ -96,6 +98,7 @@ prepare() {
# Patching if needed
patch -Np1 -i "${srcdir}"/vmaf-model-path.patch
+ patch -Np1 -i "${srcdir}"/issue8760-fix-libsrt-1.4.1.patch
}
build() {
diff --git a/issue8760-fix-libsrt-1.4.1.patch b/issue8760-fix-libsrt-1.4.1.patch
new file mode 100644
index 00000000000..4c1399f937e
--- /dev/null
+++ b/issue8760-fix-libsrt-1.4.1.patch
@@ -0,0 +1,47 @@
+From: Jun Zhao <barryjzhao@tencent.com>
+Date: Sun, 12 Jul 2020 05:48:48 +0000 (+0800)
+Subject: lavf/srt: fix build fail when used the libsrt 1.4.1
+X-Git-Url: https://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315
+
+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>
+---
+
+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)) { \ No newline at end of file