Accepting request 841753 from multimedia:libs

- 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/request/show/841753
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ffmpeg-4?expand=0&rev=33
This commit is contained in:
Dominique Leuenberger 2020-10-18 14:18:55 +00:00 committed by Git OBS Bridge
commit 77eb5e54a9
4 changed files with 93 additions and 17 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
@ -783,42 +784,51 @@ done
%_bindir/*
%_mandir/man1/ff*.1*
%_datadir/ffmpeg/
%_libdir/libavcodec.so.58
%_libdir/libavdevice.so.58
%_libdir/libavfilter.so.7
%_libdir/libavformat.so.58
%_libdir/libavresample.so.4
%_libdir/libavutil.so.56
%_libdir/libpostproc.so.55
%_libdir/libswresample.so.3
%_libdir/libswscale.so.5
%files -n libavcodec58_91
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavcodec.so.*
%_libdir/libavcodec.so.58.91*
%files -n libavdevice58_10
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavdevice.so.*
%_libdir/libavdevice.so.58.10*
%files -n libavfilter7_85
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavfilter.so.*
%_libdir/libavfilter.so.7.85*
%files -n libavformat58_45
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavformat.so.*
%_libdir/libavformat.so.58.45*
%files -n libavresample4_0
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavresample.so.*
%_libdir/libavresample.so.4.0*
%files -n libavutil56_51
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavutil.so.*
%_libdir/libavutil.so.56.51*
%files -n libpostproc55_7
%license COPYING.GPLv2 LICENSE.md
%_libdir/libpostproc.so.*
%_libdir/libpostproc.so.55.7*
%files -n libswresample3_7
%license COPYING.GPLv2 LICENSE.md
%_libdir/libswresample.so.*
%_libdir/libswresample.so.3.7*
%files -n libswscale5_7
%license COPYING.GPLv2 LICENSE.md
%_libdir/libswscale.so.*
%_libdir/libswscale.so.5.7*
%files libavcodec-devel
%dir %_includedir/ffmpeg/

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