SHA256
1
0
forked from pool/ffmpeg-4

- Adjust soversion.patch to include a symlink [boo#1177667]

- Add 0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch

OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=139
This commit is contained in:
Jan Engelhardt 2020-10-14 10:04:32 +00:00 committed by Git OBS Bridge
parent 4a0c85f142
commit ec2e992468
4 changed files with 75 additions and 8 deletions

View File

@ -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.28.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 14 09:45:07 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Adjust soversion.patch to include a symlink [boo#1177667]
- Add 0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch
-------------------------------------------------------------------
Mon Jul 27 13:39:27 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>

View File

@ -115,6 +115,7 @@ Patch3: ffmpeg-codec-choice.diff
Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch
Patch5: soversion.patch
Patch6: ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch
Patch7: 0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch
BuildRequires: ladspa-devel
BuildRequires: libgsm-devel
BuildRequires: libmp3lame-devel

View File

@ -14,15 +14,21 @@ unclear when upstream will have implemented a solution. Until then,
we will need to tighten the requirements between packages, to which
end we stretch the SOVERSION to include MINOR.
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Programs linking to libavcodec get the right DT_NEEDED field with value
libavcodec.so.58.91, and so they do not request libavcodec.so.58 (which could
potentially lead to libavcodec.so.58.54).
Programs dlopening libavcodec.so.58 will get something random, that's
what dlopening programs have to deal with.
Index: ffmpeg-4.3/configure
---
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: ffmpeg-4.3.1/configure
===================================================================
--- ffmpeg-4.3.orig/configure
+++ ffmpeg-4.3/configure
@@ -3794,7 +3794,7 @@ SLIBPREF="lib"
--- ffmpeg-4.3.1.orig/configure
+++ ffmpeg-4.3.1/configure
@@ -3794,10 +3794,10 @@ SLIBPREF="lib"
SLIBSUF=".so"
SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
@ -30,4 +36,8 @@ Index: ffmpeg-4.3/configure
+SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
-SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
+SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME) $(SLIBNAME).$(LIBMAJOR)'
VERSION_SCRIPT_POSTPROCESS_CMD="cat"
asflags_filter=echo