From ec2e9924687f299781ca8f17b5a5ecf044d7f69eecea37c21b0553261a3d9a56 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 14 Oct 2020 10:04:32 +0000 Subject: [PATCH 1/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 --- ...uild-fail-when-used-the-libsrt-1.4.1.patch | 50 +++++++++++++++++++ ffmpeg-4.changes | 6 +++ ffmpeg-4.spec | 1 + soversion.patch | 26 +++++++--- 4 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch diff --git a/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch b/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch new file mode 100644 index 0000000..bcf1414 --- /dev/null +++ b/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch @@ -0,0 +1,50 @@ +From 7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315 Mon Sep 17 00:00:00 2001 +From: Jun Zhao +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 +--- + 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 + diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index ef7d4df..02c62ac 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 14 09:45:07 UTC 2020 - Jan Engelhardt + +- 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 diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 3d3450b..8fd429a 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -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 diff --git a/soversion.patch b/soversion.patch index 8fb428c..fc2bcb7 100644 --- a/soversion.patch +++ b/soversion.patch @@ -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 From fc325293db0843e8823f185d6a8285a8c4c1152003d6154e03bc2f1c73afefd0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 14 Oct 2020 10:16:34 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=140 --- ffmpeg-4.spec | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 8fd429a..b7df3f8 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -784,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/ From 77330a4b52aa61206089faebf0ce3cede912fe0af2a77a7d4dcc46648dc57fa5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 14 Oct 2020 10:58:53 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=141 --- baselibs.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/baselibs.conf b/baselibs.conf index 9e618c7..e0a7ee7 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,3 +1,4 @@ +ffmpeg-4 libavcodec58_91 libavdevice58_10 libavfilter7_85 From 9946f455f9ec31dae48a777c305841f630f4de4376a3f48e2d26433c592005d0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 14 Oct 2020 11:06:01 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=142 --- baselibs.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/baselibs.conf b/baselibs.conf index e0a7ee7..9e618c7 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,3 @@ -ffmpeg-4 libavcodec58_91 libavdevice58_10 libavfilter7_85