From d6b25f2cd18d6ab236ff85dd38d50574acfd9aec2c683a86de0d394df37905ee Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 23 Jul 2022 12:06:00 +0000 Subject: [PATCH 1/6] - Update to release 5.1 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=16 --- abi_break.txt | 112 +++++++++++++ baselibs.conf | 16 +- ffmpeg-4.2-dlopen-fdk_aac.patch | 43 +++-- ffmpeg-5.0.1.tar.xz | 3 - ffmpeg-5.0.1.tar.xz.asc | 11 -- ffmpeg-5.1.tar.xz | 3 + ffmpeg-5.1.tar.xz.asc | 11 ++ ffmpeg-5.changes | 14 ++ ffmpeg-5.spec | 186 +++++++++++---------- ffmpeg-chromium.patch | 29 ++-- ffmpeg-dlopen-openh264.patch | 87 +++++----- ffmpeg-openh264-averr-on-bad-version.patch | 38 ----- vmaf-trim-usr-local.patch | 17 -- work-around-abi-break.patch | 58 +++++++ 14 files changed, 390 insertions(+), 238 deletions(-) create mode 100644 abi_break.txt delete mode 100644 ffmpeg-5.0.1.tar.xz delete mode 100644 ffmpeg-5.0.1.tar.xz.asc create mode 100644 ffmpeg-5.1.tar.xz create mode 100644 ffmpeg-5.1.tar.xz.asc delete mode 100644 ffmpeg-openh264-averr-on-bad-version.patch delete mode 100644 vmaf-trim-usr-local.patch create mode 100644 work-around-abi-break.patch diff --git a/abi_break.txt b/abi_break.txt new file mode 100644 index 0000000..3dacf06 --- /dev/null +++ b/abi_break.txt @@ -0,0 +1,112 @@ +========================================== +abidiff /usr/lib64/libavcodec.so.59.18.100 b/usr/lib64/libavcodec.so.59.37.100 +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable +Function symbols changes summary: 1 Removed, 0 Added function symbol not referenced by debug info +Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info + +1 Removed function symbol not referenced by debug info: + + [D] avpriv_h264_has_num_reorder_frames@@LIBAVCODEC_59 + +========================================== +abidiff /usr/lib64/libavdevice.so.59.4.100 b/usr/lib64/libavdevice.so.59.7.100 + +========================================== +abidiff /usr/lib64/libavfilter.so.8.24.100 b/usr/lib64/libavfilter.so.8.44.100 +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable +Function symbols changes summary: 0 Removed, 1 Added function symbol not referenced by debug info +Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info + +1 Added function symbol not referenced by debug info: + + [A] av_buffersink_get_ch_layout@@LIBAVFILTER_8 + +========================================== +abidiff /usr/lib64/libavformat.so.59.16.100 b/usr/lib64/libavformat.so.59.27.100 +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable +Function symbols changes summary: 0 Removed, 1 Added function symbol not referenced by debug info +Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info + +1 Added function symbol not referenced by debug info: + + [A] avio_vprintf@@LIBAVFORMAT_59 + +========================================== +abidiff /usr/lib64/libavutil.so.57.17.100 b/usr/lib64/libavutil.so.57.28.100 +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable +Function symbols changes summary: 0 Removed, 47 Added function symbols not referenced by debug info +Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info + +47 Added function symbols not referenced by debug info: + + [A] av_channel_description@@LIBAVUTIL_57 + [A] av_channel_description_bprint@@LIBAVUTIL_57 + [A] av_channel_from_string@@LIBAVUTIL_57 + [A] av_channel_layout_channel_from_index@@LIBAVUTIL_57 + [A] av_channel_layout_channel_from_string@@LIBAVUTIL_57 + [A] av_channel_layout_check@@LIBAVUTIL_57 + [A] av_channel_layout_compare@@LIBAVUTIL_57 + [A] av_channel_layout_copy@@LIBAVUTIL_57 + [A] av_channel_layout_default@@LIBAVUTIL_57 + [A] av_channel_layout_describe@@LIBAVUTIL_57 + [A] av_channel_layout_describe_bprint@@LIBAVUTIL_57 + [A] av_channel_layout_from_mask@@LIBAVUTIL_57 + [A] av_channel_layout_from_string@@LIBAVUTIL_57 + [A] av_channel_layout_index_from_channel@@LIBAVUTIL_57 + [A] av_channel_layout_index_from_string@@LIBAVUTIL_57 + [A] av_channel_layout_standard@@LIBAVUTIL_57 + [A] av_channel_layout_subset@@LIBAVUTIL_57 + [A] av_channel_layout_uninit@@LIBAVUTIL_57 + [A] av_channel_name@@LIBAVUTIL_57 + [A] av_channel_name_bprint@@LIBAVUTIL_57 + [A] av_csp_luma_coeffs_from_avcsp@@LIBAVUTIL_57 + [A] av_csp_primaries_desc_from_id@@LIBAVUTIL_57 + [A] av_csp_primaries_id_from_desc@@LIBAVUTIL_57 + [A] av_dynamic_hdr_vivid_alloc@@LIBAVUTIL_57 + [A] av_dynamic_hdr_vivid_create_side_data@@LIBAVUTIL_57 + [A] av_fifo_alloc2@@LIBAVUTIL_57 + [A] av_fifo_auto_grow_limit@@LIBAVUTIL_57 + [A] av_fifo_can_read@@LIBAVUTIL_57 + [A] av_fifo_can_write@@LIBAVUTIL_57 + [A] av_fifo_drain2@@LIBAVUTIL_57 + [A] av_fifo_elem_size@@LIBAVUTIL_57 + [A] av_fifo_freep2@@LIBAVUTIL_57 + [A] av_fifo_grow2@@LIBAVUTIL_57 + [A] av_fifo_peek@@LIBAVUTIL_57 + [A] av_fifo_peek_to_cb@@LIBAVUTIL_57 + [A] av_fifo_read@@LIBAVUTIL_57 + [A] av_fifo_read_to_cb@@LIBAVUTIL_57 + [A] av_fifo_reset2@@LIBAVUTIL_57 + [A] av_fifo_write@@LIBAVUTIL_57 + [A] av_fifo_write_from_cb@@LIBAVUTIL_57 + [A] av_opt_get_chlayout@@LIBAVUTIL_57 + [A] av_opt_set_chlayout@@LIBAVUTIL_57 + [A] av_uuid_parse@@LIBAVUTIL_57 + [A] av_uuid_parse_range@@LIBAVUTIL_57 + [A] av_uuid_unparse@@LIBAVUTIL_57 + [A] av_uuid_urn_parse@@LIBAVUTIL_57 + [A] avpriv_fopen_utf8@@LIBAVUTIL_57 + +========================================== +abidiff /usr/lib64/libswresample.so.4.3.100 b/usr/lib64/libswresample.so.4.7.100 +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable +Function symbols changes summary: 0 Removed, 2 Added function symbols not referenced by debug info +Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info + +2 Added function symbols not referenced by debug info: + + [A] swr_alloc_set_opts2@@LIBSWRESAMPLE_4 + [A] swr_build_matrix2@@LIBSWRESAMPLE_4 + +========================================== +abidiff /usr/lib64/libswscale.so.6.4.100 b/usr/lib64/libswscale.so.6.7.100 + +========================================== +abidiff /usr/lib64/libpostproc.so.56.3.100 b/usr/lib64/libpostproc.so.56.6.100 + +========================================== diff --git a/baselibs.conf b/baselibs.conf index a152bda..ca8f122 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,8 +1,8 @@ -libavcodec59 -libavdevice59 -libavfilter8 -libavformat59 -libavutil57 -libpostproc56 -libswresample4 -libswscale6 +libavcodec59_37 +libavdevice59_7 +libavfilter8_44 +libavformat59_27 +libavutil57_28 +libpostproc56_6 +libswresample4_7 +libswscale6_7 diff --git a/ffmpeg-4.2-dlopen-fdk_aac.patch b/ffmpeg-4.2-dlopen-fdk_aac.patch index dfeba6f..ef99d24 100644 --- a/ffmpeg-4.2-dlopen-fdk_aac.patch +++ b/ffmpeg-4.2-dlopen-fdk_aac.patch @@ -1,3 +1,10 @@ +From: Ismail Dönmez +Date: 2019-06-11 11:21:23 + +This is ffmpeg-4.1-dlopen-faac-mp3lame-opencore-x264-x265-xvid.patch +from OpenMandriva to optionally enable runtime enabling of +fdkaac/lame/x264/x265. + --- configure | 3 ++ libavcodec/dlopen.h | 12 ++++++++++ @@ -5,10 +12,10 @@ libavcodec/libfdk-aacenc.c | 47 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+) -Index: ffmpeg-5.0/configure +Index: ffmpeg-5.1/configure =================================================================== ---- ffmpeg-5.0.orig/configure -+++ ffmpeg-5.0/configure +--- ffmpeg-5.1.orig/configure ++++ ffmpeg-5.1/configure @@ -231,6 +231,7 @@ External library support: --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [no] @@ -17,7 +24,7 @@ Index: ffmpeg-5.0/configure --enable-libflite enable flite (voice synthesis) support via libflite [no] --enable-libfontconfig enable libfontconfig, useful for drawtext filter [no] --enable-libfreetype enable libfreetype, needed for drawtext filter [no] -@@ -1784,6 +1785,7 @@ EXTERNAL_LIBRARY_GPL_LIST=" +@@ -1787,6 +1788,7 @@ EXTERNAL_LIBRARY_GPL_LIST=" EXTERNAL_LIBRARY_NONFREE_LIST=" decklink libfdk_aac @@ -25,7 +32,7 @@ Index: ffmpeg-5.0/configure libtls " -@@ -6528,6 +6530,7 @@ enabled libdrm && require_pkg +@@ -6544,6 +6546,7 @@ enabled libdrm && require_pkg enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && warn "using libfdk without pkg-config"; } } @@ -33,10 +40,10 @@ Index: ffmpeg-5.0/configure flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite" enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs enabled fontconfig && enable libfontconfig -Index: ffmpeg-5.0/libavcodec/dlopen.h +Index: ffmpeg-5.1/libavcodec/dlopen.h =================================================================== --- /dev/null -+++ ffmpeg-5.0/libavcodec/dlopen.h ++++ ffmpeg-5.1/libavcodec/dlopen.h @@ -0,0 +1,12 @@ +#ifndef LOCALINC_DLOPEN_H +#define LOCALINC_DLOPEN_H @@ -50,11 +57,11 @@ Index: ffmpeg-5.0/libavcodec/dlopen.h + goto error; + +#endif -Index: ffmpeg-5.0/libavcodec/libfdk-aacdec.c +Index: ffmpeg-5.1/libavcodec/libfdk-aacdec.c =================================================================== ---- ffmpeg-5.0.orig/libavcodec/libfdk-aacdec.c -+++ ffmpeg-5.0/libavcodec/libfdk-aacdec.c -@@ -37,6 +37,54 @@ +--- ffmpeg-5.1.orig/libavcodec/libfdk-aacdec.c ++++ ffmpeg-5.1/libavcodec/libfdk-aacdec.c +@@ -38,6 +38,54 @@ #define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS #endif @@ -109,7 +116,7 @@ Index: ffmpeg-5.0/libavcodec/libfdk-aacdec.c enum ConcealMethod { CONCEAL_METHOD_SPECTRAL_MUTING = 0, CONCEAL_METHOD_NOISE_SUBSTITUTION = 1, -@@ -229,6 +277,11 @@ static av_cold int fdk_aac_decode_init(A +@@ -244,6 +292,11 @@ static av_cold int fdk_aac_decode_init(A FDKAACDecContext *s = avctx->priv_data; AAC_DECODER_ERROR err; @@ -121,10 +128,10 @@ Index: ffmpeg-5.0/libavcodec/libfdk-aacdec.c s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1); if (!s->handle) { av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n"); -Index: ffmpeg-5.0/libavcodec/libfdk-aacenc.c +Index: ffmpeg-5.1/libavcodec/libfdk-aacenc.c =================================================================== ---- ffmpeg-5.0.orig/libavcodec/libfdk-aacenc.c -+++ ffmpeg-5.0/libavcodec/libfdk-aacenc.c +--- ffmpeg-5.1.orig/libavcodec/libfdk-aacenc.c ++++ ffmpeg-5.1/libavcodec/libfdk-aacenc.c @@ -36,6 +36,48 @@ #define FDKENC_VER_AT_LEAST(vl0, vl1) 0 #endif @@ -179,10 +186,10 @@ Index: ffmpeg-5.0/libavcodec/libfdk-aacenc.c int sce = 0, cpe = 0; +#ifdef CONFIG_LIBFDK_AAC_DLOPEN -+ if (loadLibFdkAac(avctx)) -+ return -1; ++ if (loadLibFdkAac(avctx)) ++ return -1; +#endif + - if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) { + if ((err = aacEncOpen(&s->handle, 0, avctx->ch_layout.nb_channels)) != AACENC_OK) { av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n", aac_get_error(err)); diff --git a/ffmpeg-5.0.1.tar.xz b/ffmpeg-5.0.1.tar.xz deleted file mode 100644 index 047f500..0000000 --- a/ffmpeg-5.0.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b -size 9812524 diff --git a/ffmpeg-5.0.1.tar.xz.asc b/ffmpeg-5.0.1.tar.xz.asc deleted file mode 100644 index 39793f1..0000000 --- a/ffmpeg-5.0.1.tar.xz.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQFMBAABCAA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmJLTc4YHGZmbXBlZy1k -ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYlgcIAIKL9GBD8/flExnqTUchsP9S -eUIhStzdEUx2m53UQHms0JvtMF/Yc/nmqTVbMzZVZqDSfbjmDlXRv2uZvZmpvw6X -RlmTDpoeOZ7CSiNdq8junvGl6CJyjuGaxsOKcDi60qwevXp0Wdd4vLYg+3KUqpS5 -p6CyPTPb5eYEMFNzTnFdCDDctLt4JXJoLeDTSpbP5k84D1oxD6rx2DSoXM5gDLcs -lqui1Bp0Vf9PexwJSyhLSPhwA/jfDWjMA647Wiuj2mrmX/DBiofe8U/OaKtSYybz -1+p6cW2Nozg4xVD5oVjXzB5Vg8O5r52lia93+qBXUqAzJFVt9m5znK5lLHQjK3g= -=tNv7 ------END PGP SIGNATURE----- diff --git a/ffmpeg-5.1.tar.xz b/ffmpeg-5.1.tar.xz new file mode 100644 index 0000000..2b0f84c --- /dev/null +++ b/ffmpeg-5.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55eb6aab5ee235550fa54a33eaf8bf1b4ec66c01453182b12f6a993d75698b03 +size 10001864 diff --git a/ffmpeg-5.1.tar.xz.asc b/ffmpeg-5.1.tar.xz.asc new file mode 100644 index 0000000..56005bb --- /dev/null +++ b/ffmpeg-5.1.tar.xz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQFMBAABCAA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmLa5jEYHGZmbXBlZy1k +ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljY4MYH/ReKAbl2QS5Zkc/tr2Nva8tn +yhjBhPYKojRQq5BPwXhoQl9WRAsU6pO/kM7TnPiPkySH5AkPkocSIIcXg9mEY/P/ +Q+3JfKXEs+h2YWlsq/7eqfKvauDLvhIAXseDhgNCADccj6Y18sDOYvtPnr93eYwK +shhhdBXcZcugaqIEJmcZmMsnW3Apfn9NvNj4LPRHI6jIvO4ivN3Bny9aN0ypayMP +/AVBBQR+VI9j4esU1ITROHlczK5cbLOhb5mKSRIBPAa1oelBp4MBo7rdO98+fMzN +n6ZFsQ8TbOoSICT/qBdVnLJYq74O75r4s56GUzNVINkgrP/JYvZGXB81ae9wsrc= +=S39U +-----END PGP SIGNATURE----- diff --git a/ffmpeg-5.changes b/ffmpeg-5.changes index 2a8b33a..b162f31 100644 --- a/ffmpeg-5.changes +++ b/ffmpeg-5.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sat Jul 23 08:35:20 UTC 2022 - Jan Engelhardt + +- Update to release 5.1 + * AVIF image muxer support for the AV1-based image format + * JPEG-XL image support. + * Removed the X-Video Motion Compensation (XvMC) hardware acceleration + - IPFS/IPNS protocol support. + +- PCM-Bluray encoder support. +- Drop vmaf-trim-usr-local.patch (obsolete), + ffmpeg-openh264-averr-on-bad-version.patch (merged) +- Add work-around-abi-break.patch + ------------------------------------------------------------------- Sat Apr 9 22:36:13 UTC 2022 - Dirk Müller diff --git a/ffmpeg-5.spec b/ffmpeg-5.spec index 56eb951..ab19ec8 100644 --- a/ffmpeg-5.spec +++ b/ffmpeg-5.spec @@ -75,7 +75,7 @@ %define _major_expected 6 Name: ffmpeg-5 -Version: 5.0.1 +Version: 5.1 Release: 0 Summary: Set of libraries for working with various multimedia formats License: GPL-3.0-or-later @@ -91,6 +91,7 @@ Source4: enable_decoders Source5: enable_encoders Source6: ffmpeg-dlopen-headers.tar.xz Source92: ffmpeg_get_dlopen_headers.sh +Source97: abi_break.txt Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-5.keyring Source99: baselibs.conf @@ -98,10 +99,9 @@ Patch1: ffmpeg-arm6l.diff Patch2: ffmpeg-new-coder-errors.diff Patch3: ffmpeg-codec-choice.diff Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch -Patch8: vmaf-trim-usr-local.patch +Patch5: work-around-abi-break.patch Patch9: ffmpeg-4.4-CVE-2020-22046.patch Patch10: ffmpeg-chromium.patch -Patch11: ffmpeg-openh264-averr-on-bad-version.patch Patch91: ffmpeg-dlopen-openh264.patch BuildRequires: ladspa-devel @@ -219,14 +219,22 @@ Provides: ffmpeg-tools = %version Obsoletes: ffmpeg-tools < %version Provides: ffmpeg = %version Obsoletes: ffmpeg < %version -Requires: libavcodec59 = %version-%release -Requires: libavdevice59 = %version-%release -Requires: libavfilter8 = %version-%release -Requires: libavformat59 = %version-%release -Requires: libavutil57 = %version-%release -Requires: libpostproc56 = %version-%release -Requires: libswresample4 = %version-%release -Requires: libswscale6 = %version-%release +Requires: libavcodec59_37 = %version-%release +Requires: libavdevice59_7 = %version-%release +Requires: libavfilter8_44 = %version-%release +Requires: libavformat59_27 = %version-%release +Requires: libavutil57_28 = %version-%release +Requires: libpostproc56_6 = %version-%release +Requires: libswresample4_7 = %version-%release +Requires: libswscale6_7 = %version-%release +Conflicts: libavcodec59 < %version +Conflicts: libavdevice59 < %version +Conflicts: libavfilter8 < %version +Conflicts: libavformat59 < %version +Conflicts: libavutil57 < %version +Conflicts: libpostproc56 < %version +Conflicts: libswresample4 < %version +Conflicts: libswresample6 < %version %description FFmpeg is a multimedia framework, able to decode, encode, @@ -237,11 +245,11 @@ that humans and machines have created. This build of ffmpeg is limited in the number of codecs supported. %endif -%package -n libavcodec59 +%package -n libavcodec59_37 Summary: FFmpeg codec library Group: System/Libraries -Requires: libavutil57 = %version-%release -Requires: libswresample4 = %version-%release +Requires: libavutil57_28 = %version-%release +Requires: libswresample4_7 = %version-%release %if 0%{?BUILD_ORIG} Provides: libavcodec-full = %version-%release # This can be (and is) required by packages like vlc-codecs - @@ -251,7 +259,7 @@ Provides: libavcodec59(unrestricted) # For mozillas Provides: libavcodec = %version-%release -%description -n libavcodec59 +%description -n libavcodec59_37 The libavcodec library provides a generic encoding/decoding framework and contains multiple decoders and encoders for audio, video and subtitle streams, and several bitstream filters. @@ -266,7 +274,7 @@ Group: Development/Libraries/C and C++ Provides: libavcodec-devel = %version-%release Obsoletes: libavcodec-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libavcodec59 = %version-%release +Requires: libavcodec59_37 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -277,15 +285,15 @@ subtitle streams, and several bitstream filters. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavdevice59 +%package -n libavdevice59_7 Summary: FFmpeg device library Group: System/Libraries -Requires: libavcodec59 = %version-%release -Requires: libavfilter8 = %version-%release -Requires: libavformat59 = %version-%release -Requires: libavutil57 = %version-%release +Requires: libavcodec59_37 = %version-%release +Requires: libavfilter8_44 = %version-%release +Requires: libavformat59_27 = %version-%release +Requires: libavutil57_28 = %version-%release -%description -n libavdevice59 +%description -n libavdevice59_7 The libavdevice library provides a generic framework for grabbing from and rendering to many common multimedia input/output devices, and supports several input and output devices, including Video4Linux2, VfW, @@ -305,7 +313,7 @@ Requires: %name-libavutil-devel = %version-%release Requires: %name-libpostproc-devel = %version-%release Requires: %name-libswresample-devel = %version-%release Requires: %name-libswscale-devel = %version-%release -Requires: libavdevice59 = %version-%release +Requires: libavdevice59_7 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -317,17 +325,17 @@ DShow, and ALSA. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavfilter8 +%package -n libavfilter8_44 Summary: FFmpeg audio and video filtering library Group: System/Libraries -Requires: libavcodec59 = %version-%release -Requires: libavformat59 = %version-%release -Requires: libavutil57 = %version-%release -Requires: libpostproc56 = %version-%release -Requires: libswresample4 = %version-%release -Requires: libswscale6 = %version-%release +Requires: libavcodec59_37 = %version-%release +Requires: libavformat59_7 = %version-%release +Requires: libavutil57_28 = %version-%release +Requires: libpostproc56_6 = %version-%release +Requires: libswresample4_7 = %version-%release +Requires: libswscale6_7 = %version-%release -%description -n libavfilter8 +%description -n libavfilter8_44 The libavfilter library provides a generic audio/video filtering framework containing several filters, sources and sinks. @@ -342,7 +350,7 @@ Requires: %name-libavutil-devel = %version-%release Requires: %name-libpostproc-devel = %version-%release Requires: %name-libswresample-devel = %version-%release Requires: %name-libswscale-devel = %version-%release -Requires: libavfilter8 = %version-%release +Requires: libavfilter8_44 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -352,13 +360,13 @@ framework containing several filters, sources and sinks. This subpackage contains the headers for FFmpeg libavfilter. -%package -n libavformat59 +%package -n libavformat59_27 Summary: FFmpeg's stream format library Group: System/Libraries -Requires: libavcodec59 = %version-%release -Requires: libavutil57 = %version-%release +Requires: libavcodec59_37 = %version-%release +Requires: libavutil57_28 = %version-%release -%description -n libavformat59 +%description -n libavformat59_27 The libavformat library provides a generic framework for multiplexing and demultiplexing (muxing and demuxing) audio, video and subtitle streams. It encompasses multiple muxers and demuxers for multimedia @@ -376,7 +384,7 @@ Obsoletes: libavformat-devel < %version-%release Requires: %name-libavcodec-devel = %version-%release Requires: %name-libavutil-devel = %version-%release Requires: %name-libswresample-devel = %version-%release -Requires: libavformat59 = %version-%release +Requires: libavformat59_27 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -388,11 +396,11 @@ container formats. This subpackage contains the headers for FFmpeg libavformat. -%package -n libavutil57 +%package -n libavutil57_28 Summary: FFmpeg's utility library Group: System/Libraries -%description -n libavutil57 +%description -n libavutil57_28 The libavutil library is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, @@ -404,7 +412,7 @@ Summary: Development files for FFmpeg's utility library Group: Development/Libraries/C and C++ Provides: libavutil-devel = %version-%release Obsoletes: libavutil-devel < %version-%release -Requires: libavutil57 = %version-%release +Requires: libavutil57_28 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -417,12 +425,12 @@ for pixel and sample formats). This subpackage contains the headers for FFmpeg libavutil. -%package -n libpostproc56 +%package -n libpostproc56_6 Summary: FFmpeg post-processing library Group: System/Libraries -Requires: libavutil57 = %version-%release +Requires: libavutil57_28 = %version-%release -%description -n libpostproc56 +%description -n libpostproc56_6 A library with video postprocessing filters, such as deblocking and deringing filters, noise reduction, automatic contrast and brightness correction, linear/cubic interpolating deinterlacing. @@ -433,7 +441,7 @@ Group: Development/Libraries/C and C++ Provides: libpostproc-devel = %version-%release Obsoletes: libpostproc-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libpostproc56 = %version-%release +Requires: libpostproc56_6 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -444,12 +452,12 @@ correction, linear/cubic interpolating deinterlacing. This subpackage contains the headers for FFmpeg libpostproc. -%package -n libswresample4 +%package -n libswresample4_7 Summary: FFmpeg software resampling library Group: System/Libraries -Requires: libavutil57 = %version-%release +Requires: libavutil57_28 = %version-%release -%description -n libswresample4 +%description -n libswresample4_7 The libswresample library performs audio conversion between different sample rates, channel layout and channel formats. @@ -459,7 +467,7 @@ Group: Development/Libraries/C and C++ Provides: libswresample-devel = %version-%release Obsoletes: libswresample-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libswresample4 = %version-%release +Requires: libswresample4_7 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -469,12 +477,12 @@ sample rates, channel layout and channel formats. This subpackage contains the headers for FFmpeg libswresample. -%package -n libswscale6 +%package -n libswscale6_7 Summary: FFmpeg image scaling and colorspace/pixel conversion library Group: System/Libraries -Requires: libavutil57 = %version-%release +Requires: libavutil57_28 = %version-%release -%description -n libswscale6 +%description -n libswscale6_7 The libswscale library performs image scaling and colorspace and pixel format conversion operations. @@ -484,7 +492,7 @@ Group: Development/Libraries/C and C++ Provides: libswscale-devel = %version-%release Conflicts: libswscale-devel Requires: %name-libavutil-devel = %version-%release -Requires: libswscale6 = %version-%release +Requires: libswscale6_7 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -658,7 +666,7 @@ LDFLAGS="%_lto_cflags" \ --enable-decoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <%_sourcedir/enable_decoders)" \ for i in MPEG4 H263 H264 HEVC VC1; do - grep -q "#define CONFIG_${i}_DECODER 0" config.h + grep -q "#define CONFIG_${i}_DECODER 0" config_components.h done %endif @@ -689,60 +697,68 @@ for i in libavformat/options_table.h libavformat/os_support.h \ cp -a $i "$b/%_includedir/ffmpeg/private/$i" done -%post -n libavcodec59 -p /sbin/ldconfig -%postun -n libavcodec59 -p /sbin/ldconfig -%post -n libavdevice59 -p /sbin/ldconfig -%postun -n libavdevice59 -p /sbin/ldconfig -%post -n libavfilter8 -p /sbin/ldconfig -%postun -n libavfilter8 -p /sbin/ldconfig -%post -n libavformat59 -p /sbin/ldconfig -%postun -n libavformat59 -p /sbin/ldconfig -%post -n libavutil57 -p /sbin/ldconfig -%postun -n libavutil57 -p /sbin/ldconfig -%post -n libpostproc56 -p /sbin/ldconfig -%postun -n libpostproc56 -p /sbin/ldconfig -%post -n libswresample4 -p /sbin/ldconfig -%postun -n libswresample4 -p /sbin/ldconfig -%post -n libswscale6 -p /sbin/ldconfig -%postun -n libswscale6 -p /sbin/ldconfig +%post -n libavcodec59_37 -p /sbin/ldconfig +%postun -n libavcodec59_37 -p /sbin/ldconfig +%post -n libavdevice59_7 -p /sbin/ldconfig +%postun -n libavdevice59_7 -p /sbin/ldconfig +%post -n libavfilter8_44 -p /sbin/ldconfig +%postun -n libavfilter8_44 -p /sbin/ldconfig +%post -n libavformat59_27 -p /sbin/ldconfig +%postun -n libavformat59_27 -p /sbin/ldconfig +%post -n libavutil57_28 -p /sbin/ldconfig +%postun -n libavutil57_28 -p /sbin/ldconfig +%post -n libpostproc56_6 -p /sbin/ldconfig +%postun -n libpostproc56_6 -p /sbin/ldconfig +%post -n libswresample4_7 -p /sbin/ldconfig +%postun -n libswresample4_7 -p /sbin/ldconfig +%post -n libswscale6_7 -p /sbin/ldconfig +%postun -n libswscale6_7 -p /sbin/ldconfig %files %doc Changelog CREDITS README.md %_bindir/* %_mandir/man1/ff*.1* %_datadir/ffmpeg/ +%_libdir/libavcodec.so.59 +%_libdir/libavdevice.so.59 +%_libdir/libavfilter.so.8 +%_libdir/libavformat.so.59 +%_libdir/libavutil.so.57 +%_libdir/libpostproc.so.56 +%_libdir/libswresample.so.4 +%_libdir/libswscale.so.6 -%files -n libavcodec59 +%files -n libavcodec59_37 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavcodec.so.59* +%_libdir/libavcodec.so.59.* -%files -n libavdevice59 +%files -n libavdevice59_7 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavdevice.so.59* +%_libdir/libavdevice.so.59.* -%files -n libavfilter8 +%files -n libavfilter8_44 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavfilter.so.8* +%_libdir/libavfilter.so.8.* -%files -n libavformat59 +%files -n libavformat59_27 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavformat.so.59* +%_libdir/libavformat.so.59.* -%files -n libavutil57 +%files -n libavutil57_28 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavutil.so.57* +%_libdir/libavutil.so.57.* -%files -n libpostproc56 +%files -n libpostproc56_6 %license COPYING.GPLv2 LICENSE.md -%_libdir/libpostproc.so.56* +%_libdir/libpostproc.so.56.* -%files -n libswresample4 +%files -n libswresample4_7 %license COPYING.GPLv2 LICENSE.md -%_libdir/libswresample.so.4* +%_libdir/libswresample.so.4.* -%files -n libswscale6 +%files -n libswscale6_7 %license COPYING.GPLv2 LICENSE.md -%_libdir/libswscale.so.6* +%_libdir/libswscale.so.6.* %files libavcodec-devel %dir %_includedir/ffmpeg/ diff --git a/ffmpeg-chromium.patch b/ffmpeg-chromium.patch index 932b63c..a626406 100644 --- a/ffmpeg-chromium.patch +++ b/ffmpeg-chromium.patch @@ -6,11 +6,16 @@ parent e073b7a22e4993e0a7cab80a42a21524e5349f95 Add av_stream_get_first_dts for Chromium -diff --git a/libavformat/avformat.h b/libavformat/avformat.h -index cd7b0d9..b4a6dce 100644 ---- a/libavformat/avformat.h -+++ b/libavformat/avformat.h -@@ -1010,6 +1010,10 @@ +--- + libavformat/avformat.h | 4 ++++ + libavformat/demux_utils.c | 7 +++++++ + 2 files changed, 11 insertions(+) + +Index: ffmpeg-5.1/libavformat/avformat.h +=================================================================== +--- ffmpeg-5.1.orig/libavformat/avformat.h ++++ ffmpeg-5.1/libavformat/avformat.h +@@ -1128,6 +1128,10 @@ struct AVCodecParserContext *av_stream_g */ int64_t av_stream_get_end_pts(const AVStream *st); @@ -21,13 +26,13 @@ index cd7b0d9..b4a6dce 100644 #define AV_PROGRAM_RUNNING 1 /** -diff --git a/libavformat/utils.c b/libavformat/utils.c -index de7580c..0ef0fe5 100644 ---- a/libavformat/utils.c -+++ b/libavformat/utils.c -@@ -121,6 +121,13 @@ - return AV_NOPTS_VALUE; - } +Index: ffmpeg-5.1/libavformat/demux_utils.c +=================================================================== +--- ffmpeg-5.1.orig/libavformat/demux_utils.c ++++ ffmpeg-5.1/libavformat/demux_utils.c +@@ -29,6 +29,13 @@ + #include "demux.h" + #include "internal.h" +// Chromium: We use the internal field first_dts vvv +int64_t av_stream_get_first_dts(const AVStream *st) diff --git a/ffmpeg-dlopen-openh264.patch b/ffmpeg-dlopen-openh264.patch index 9dc47a1..3cf31cf 100644 --- a/ffmpeg-dlopen-openh264.patch +++ b/ffmpeg-dlopen-openh264.patch @@ -12,22 +12,22 @@ Co-authored-by: Neal Gompa Signed-off-by: Andreas Schneider Signed-off-by: Neal Gompa --- - configure | 3 + - libavcodec/Makefile | 1 + - libavcodec/libopenh264.c | 15 +++- - libavcodec/libopenh264_dlopen.c | 147 ++++++++++++++++++++++++++++++++ - libavcodec/libopenh264_dlopen.h | 58 +++++++++++++ - libavcodec/libopenh264dec.c | 10 +++ - libavcodec/libopenh264enc.c | 10 +++ + configure | 3 + libavcodec/Makefile | 1 + libavcodec/libopenh264.c | 15 +++- + libavcodec/libopenh264_dlopen.c | 147 ++++++++++++++++++++++++++++++++++++++++ + libavcodec/libopenh264_dlopen.h | 58 +++++++++++++++ + libavcodec/libopenh264dec.c | 10 ++ + libavcodec/libopenh264enc.c | 10 ++ 7 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 libavcodec/libopenh264_dlopen.c create mode 100644 libavcodec/libopenh264_dlopen.h -diff --git a/configure b/configure -index 6b5ef6332e..f08e566e98 100755 ---- a/configure -+++ b/configure -@@ -250,6 +250,7 @@ External library support: +Index: ffmpeg-5.1/configure +=================================================================== +--- ffmpeg-5.1.orig/configure ++++ ffmpeg-5.1/configure +@@ -252,6 +252,7 @@ External library support: --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] --enable-libopencv enable video filtering via libopencv [no] --enable-libopenh264 enable H.264 encoding via OpenH264 [no] @@ -35,7 +35,7 @@ index 6b5ef6332e..f08e566e98 100755 --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] --enable-libopenmpt enable decoding tracked files via libopenmpt [no] --enable-libopenvino enable OpenVINO as a DNN module backend -@@ -1839,6 +1840,7 @@ EXTERNAL_LIBRARY_LIST=" +@@ -1846,6 +1847,7 @@ EXTERNAL_LIBRARY_LIST=" libmysofa libopencv libopenh264 @@ -43,7 +43,7 @@ index 6b5ef6332e..f08e566e98 100755 libopenjpeg libopenmpt libopenvino -@@ -6575,6 +6577,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h && +@@ -6599,6 +6601,7 @@ enabled libopencv && { check_hea require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } || require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; } enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion @@ -51,11 +51,11 @@ index 6b5ef6332e..f08e566e98 100755 enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version || { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } } enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++" -diff --git a/libavcodec/Makefile b/libavcodec/Makefile -index 3adf1536d8..9dc8389ce2 100644 ---- a/libavcodec/Makefile -+++ b/libavcodec/Makefile -@@ -1058,6 +1058,7 @@ OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o +Index: ffmpeg-5.1/libavcodec/Makefile +=================================================================== +--- ffmpeg-5.1.orig/libavcodec/Makefile ++++ ffmpeg-5.1/libavcodec/Makefile +@@ -1075,6 +1075,7 @@ OBJS-$(CONFIG_LIBMP3LAME_ENCODER) OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o @@ -63,10 +63,10 @@ index 3adf1536d8..9dc8389ce2 100644 OBJS-$(CONFIG_LIBOPENH264_DECODER) += libopenh264dec.o libopenh264.o OBJS-$(CONFIG_LIBOPENH264_ENCODER) += libopenh264enc.o libopenh264.o OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpegdec.o -diff --git a/libavcodec/libopenh264.c b/libavcodec/libopenh264.c -index 59c61a3a4c..9b7dfc59be 100644 ---- a/libavcodec/libopenh264.c -+++ b/libavcodec/libopenh264.c +Index: ffmpeg-5.1/libavcodec/libopenh264.c +=================================================================== +--- ffmpeg-5.1.orig/libavcodec/libopenh264.c ++++ ffmpeg-5.1/libavcodec/libopenh264.c @@ -20,8 +20,13 @@ */ @@ -79,9 +79,9 @@ index 59c61a3a4c..9b7dfc59be 100644 #include +#endif + #include "libavutil/error.h" #include "libavutil/log.h" - -@@ -52,7 +57,15 @@ int ff_libopenh264_check_version(void *logctx) +@@ -53,7 +58,15 @@ int ff_libopenh264_check_version(void *l // function (for functions returning larger structs), thus skip the check in those // configurations. #if !defined(_WIN32) || !defined(__GNUC__) || !ARCH_X86_32 || AV_GCC_VERSION_AT_LEAST(4, 7) @@ -98,11 +98,10 @@ index 59c61a3a4c..9b7dfc59be 100644 if (memcmp(&libver, &g_stCodecVersion, sizeof(libver))) { av_log(logctx, AV_LOG_ERROR, "Incorrect library version loaded\n"); return AVERROR(EINVAL); -diff --git a/libavcodec/libopenh264_dlopen.c b/libavcodec/libopenh264_dlopen.c -new file mode 100644 -index 0000000000..b350679f18 +Index: ffmpeg-5.1/libavcodec/libopenh264_dlopen.c +=================================================================== --- /dev/null -+++ b/libavcodec/libopenh264_dlopen.c ++++ ffmpeg-5.1/libavcodec/libopenh264_dlopen.c @@ -0,0 +1,147 @@ +/* + * OpenH264 dlopen code @@ -251,11 +250,10 @@ index 0000000000..b350679f18 + + return 0; +} -diff --git a/libavcodec/libopenh264_dlopen.h b/libavcodec/libopenh264_dlopen.h -new file mode 100644 -index 0000000000..d7d8bb7cad +Index: ffmpeg-5.1/libavcodec/libopenh264_dlopen.h +=================================================================== --- /dev/null -+++ b/libavcodec/libopenh264_dlopen.h ++++ ffmpeg-5.1/libavcodec/libopenh264_dlopen.h @@ -0,0 +1,58 @@ +/* + * OpenH264 dlopen code @@ -315,10 +313,10 @@ index 0000000000..d7d8bb7cad +#endif /* CONFIG_LIBOPENH264_DLOPEN */ + +#endif /* HAVE_LIBOPENH264_DLOPEN_H */ -diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c -index 97d3630df6..feb0a0927e 100644 ---- a/libavcodec/libopenh264dec.c -+++ b/libavcodec/libopenh264dec.c +Index: ffmpeg-5.1/libavcodec/libopenh264dec.c +=================================================================== +--- ffmpeg-5.1.orig/libavcodec/libopenh264dec.c ++++ ffmpeg-5.1/libavcodec/libopenh264dec.c @@ -19,8 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -332,7 +330,7 @@ index 97d3630df6..feb0a0927e 100644 #include "libavutil/common.h" #include "libavutil/fifo.h" -@@ -55,6 +59,12 @@ static av_cold int svc_decode_init(AVCodecContext *avctx) +@@ -56,6 +60,12 @@ static av_cold int svc_decode_init(AVCod int log_level; WelsTraceCallback callback_function; @@ -345,10 +343,10 @@ index 97d3630df6..feb0a0927e 100644 if ((err = ff_libopenh264_check_version(avctx)) < 0) return AVERROR_DECODER_NOT_FOUND; -diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c -index 2001dc22b4..c8b1348df2 100644 ---- a/libavcodec/libopenh264enc.c -+++ b/libavcodec/libopenh264enc.c +Index: ffmpeg-5.1/libavcodec/libopenh264enc.c +=================================================================== +--- ffmpeg-5.1.orig/libavcodec/libopenh264enc.c ++++ ffmpeg-5.1/libavcodec/libopenh264enc.c @@ -19,8 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -362,7 +360,7 @@ index 2001dc22b4..c8b1348df2 100644 #include "libavutil/attributes.h" #include "libavutil/common.h" -@@ -136,6 +140,12 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) +@@ -137,6 +141,12 @@ static av_cold int svc_encode_init(AVCod WelsTraceCallback callback_function; AVCPBProperties *props; @@ -375,6 +373,3 @@ index 2001dc22b4..c8b1348df2 100644 if ((err = ff_libopenh264_check_version(avctx)) < 0) return AVERROR_ENCODER_NOT_FOUND; --- -2.34.1 - diff --git a/ffmpeg-openh264-averr-on-bad-version.patch b/ffmpeg-openh264-averr-on-bad-version.patch deleted file mode 100644 index 6273c06..0000000 --- a/ffmpeg-openh264-averr-on-bad-version.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b3b0ff6ef4b5bb3e2bf9649f1d7130f123f90099 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Fri, 18 Feb 2022 13:42:17 +0100 -Subject: [PATCH] avcodec/openh264: Return (DE|EN)CODER_NOT_FOUND if version - check fails - -Signed-off-by: Andreas Schneider ---- - libavcodec/libopenh264dec.c | 2 +- - libavcodec/libopenh264enc.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c -index 7f5e85402a26..97d3630df6cf 100644 ---- a/libavcodec/libopenh264dec.c -+++ b/libavcodec/libopenh264dec.c -@@ -56,7 +56,7 @@ static av_cold int svc_decode_init(AVCodecContext *avctx) - WelsTraceCallback callback_function; - - if ((err = ff_libopenh264_check_version(avctx)) < 0) -- return err; -+ return AVERROR_DECODER_NOT_FOUND; - - if (WelsCreateDecoder(&s->decoder)) { - av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n"); -diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c -index de4b85c411e0..2001dc22b4c3 100644 ---- a/libavcodec/libopenh264enc.c -+++ b/libavcodec/libopenh264enc.c -@@ -137,7 +137,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) - AVCPBProperties *props; - - if ((err = ff_libopenh264_check_version(avctx)) < 0) -- return err; -+ return AVERROR_ENCODER_NOT_FOUND; - - if (WelsCreateSVCEncoder(&s->encoder)) { - av_log(avctx, AV_LOG_ERROR, "Unable to create encoder\n"); diff --git a/vmaf-trim-usr-local.patch b/vmaf-trim-usr-local.patch deleted file mode 100644 index 5e07045..0000000 --- a/vmaf-trim-usr-local.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - libavfilter/vf_libvmaf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: ffmpeg-4.4.1/libavfilter/vf_libvmaf.c -=================================================================== ---- ffmpeg-4.4.1.orig/libavfilter/vf_libvmaf.c -+++ ffmpeg-4.4.1/libavfilter/vf_libvmaf.c -@@ -72,7 +72,7 @@ typedef struct LIBVMAFContext { - #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM - - static const AVOption libvmaf_options[] = { -- {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, -+ {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, - {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"log_fmt", "Set the format of the log (csv, json or xml).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, diff --git a/work-around-abi-break.patch b/work-around-abi-break.patch new file mode 100644 index 0000000..d3b6fbd --- /dev/null +++ b/work-around-abi-break.patch @@ -0,0 +1,58 @@ +From: Jan Engelhardt +Date: 2020-07-04 23:56:54.411950316 +0200 +References: http://ffmpeg.org/pipermail/ffmpeg-devel/2020-July/265694.html + +User frispete wrote on 2020-6-26 22:13+0000 at +https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4#comment-1257440 +: """Unfortunately, this version is binary incompatible to 4.2.3 in some +aspects. [...]""" + +Further discussion on the mailing list explored this topic, and +revealed that ELF symbol versioning is lacklusterly implemented in +ffmpeg, which can cause inadvertent mixing of library versions on +openSUSE, and precompiled Linux distributions in general. It is +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. + +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. + +[2022-07-23: ffmpeg is at it again! Reinstate the patch. + +$ abidiff abidiff /usr/lib64/libavformat.so.59.16.100 usr/lib64/libavformat.so.59.27.100 +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable +Function symbols changes summary: 0 Removed, 1 Added function symbol not referenced by debug info +Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info + +1 Added function symbol not referenced by debug info: + + [A] avio_vprintf@@LIBAVFORMAT_59 + +] + +--- + configure | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: ffmpeg-4.4.1/configure +=================================================================== +--- ffmpeg-4.4.1.orig/configure ++++ ffmpeg-4.4.1/configure +@@ -3834,10 +3834,10 @@ SLIBPREF="lib" + SLIBSUF=".so" + SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)' + SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)' +-SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)' ++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) $(SLIBNAME).$(LIBMAJOR)' + VERSION_SCRIPT_POSTPROCESS_CMD="cat" + + asflags_filter=echo From 5721745b5e5aba2f23c8a439cad1b8a673c3b9e3b87289fe67ff8e2f5ed3c3be Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 23 Jul 2022 13:04:47 +0000 Subject: [PATCH 2/6] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=17 --- ffmpeg-5.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg-5.spec b/ffmpeg-5.spec index ab19ec8..38d2f02 100644 --- a/ffmpeg-5.spec +++ b/ffmpeg-5.spec @@ -329,7 +329,7 @@ This subpackage contains the headers for FFmpeg libavcodec. Summary: FFmpeg audio and video filtering library Group: System/Libraries Requires: libavcodec59_37 = %version-%release -Requires: libavformat59_7 = %version-%release +Requires: libavformat59_27 = %version-%release Requires: libavutil57_28 = %version-%release Requires: libpostproc56_6 = %version-%release Requires: libswresample4_7 = %version-%release From 2160af4bb18e72ea9c6864fa5964340164675385dc16d084a4102722f0b46249 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 23 Jul 2022 16:51:11 +0000 Subject: [PATCH 3/6] fix up changelog syntax OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=18 --- ffmpeg-5.changes | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ffmpeg-5.changes b/ffmpeg-5.changes index b162f31..7f0b619 100644 --- a/ffmpeg-5.changes +++ b/ffmpeg-5.changes @@ -3,11 +3,11 @@ Sat Jul 23 08:35:20 UTC 2022 - Jan Engelhardt - Update to release 5.1 * AVIF image muxer support for the AV1-based image format - * JPEG-XL image support. - * Removed the X-Video Motion Compensation (XvMC) hardware acceleration - - IPFS/IPNS protocol support. - -- PCM-Bluray encoder support. + * JPEG-XL image support + * Removed the X-Video Motion Compensation (XvMC) hardware + acceleration + * IPFS/IPNS protocol support + * PCM-Bluray encoder support - Drop vmaf-trim-usr-local.patch (obsolete), ffmpeg-openh264-averr-on-bad-version.patch (merged) - Add work-around-abi-break.patch From 06ee40c89169f89a23f86cc752ecd6902a0e5a4c07a9304680a35a3a8b2ab000 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 23 Jul 2022 17:14:53 +0000 Subject: [PATCH 4/6] Accepting request 990819 from home:gmbr3:Active - Update ffmpeg-chromium.patch from upstream OBS-URL: https://build.opensuse.org/request/show/990819 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=19 --- ffmpeg-5.changes | 5 +++++ ffmpeg-chromium.patch | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ffmpeg-5.changes b/ffmpeg-5.changes index 7f0b619..2374c2a 100644 --- a/ffmpeg-5.changes +++ b/ffmpeg-5.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 23 15:29:58 UTC 2022 - Callum Farmer + +- Update ffmpeg-chromium.patch from upstream + ------------------------------------------------------------------- Sat Jul 23 08:35:20 UTC 2022 - Jan Engelhardt diff --git a/ffmpeg-chromium.patch b/ffmpeg-chromium.patch index a626406..5c3fd3e 100644 --- a/ffmpeg-chromium.patch +++ b/ffmpeg-chromium.patch @@ -8,7 +8,7 @@ Add av_stream_get_first_dts for Chromium --- libavformat/avformat.h | 4 ++++ - libavformat/demux_utils.c | 7 +++++++ + libavformat/utils.c | 7 +++++++ 2 files changed, 11 insertions(+) Index: ffmpeg-5.1/libavformat/avformat.h @@ -26,13 +26,13 @@ Index: ffmpeg-5.1/libavformat/avformat.h #define AV_PROGRAM_RUNNING 1 /** -Index: ffmpeg-5.1/libavformat/demux_utils.c +Index: ffmpeg-5.1/libavformat/utils.c =================================================================== ---- ffmpeg-5.1.orig/libavformat/demux_utils.c -+++ ffmpeg-5.1/libavformat/demux_utils.c -@@ -29,6 +29,13 @@ - #include "demux.h" - #include "internal.h" +--- ffmpeg-5.1.orig/libavformat/utils.c ++++ ffmpeg-5.1/libavformat/utils.c +@@ -121,6 +121,13 @@ + return ff_mutex_unlock(&avformat_mutex) ? -1 : 0; + } +// Chromium: We use the internal field first_dts vvv +int64_t av_stream_get_first_dts(const AVStream *st) @@ -41,6 +41,6 @@ Index: ffmpeg-5.1/libavformat/demux_utils.c +} +// Chromium: We use the internal field first_dts ^^^ + - struct AVCodecParserContext *av_stream_get_parser(const AVStream *st) - { - return cffstream(st)->parser; + /* an arbitrarily chosen "sane" max packet size -- 50M */ + #define SANE_CHUNK_SIZE (50000000) + From 506a22001729ec1ae578c30ddd518bd10537f51dc60df22de82610962c16bc7e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 26 Jul 2022 18:59:11 +0000 Subject: [PATCH 5/6] - Enable libjxl OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=20 --- ffmpeg-5.changes | 5 +++++ ffmpeg-5.spec | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ffmpeg-5.changes b/ffmpeg-5.changes index 2374c2a..5b78ec3 100644 --- a/ffmpeg-5.changes +++ b/ffmpeg-5.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 26 18:55:46 UTC 2022 - Jan Engelhardt + +- Enable libjxl + ------------------------------------------------------------------- Sat Jul 23 15:29:58 UTC 2022 - Callum Farmer diff --git a/ffmpeg-5.spec b/ffmpeg-5.spec index 38d2f02..008baab 100644 --- a/ffmpeg-5.spec +++ b/ffmpeg-5.spec @@ -156,6 +156,9 @@ BuildRequires: pkgconfig(libzmq) BuildRequires: pkgconfig(lilv-0) BuildRequires: pkgconfig(ogg) BuildRequires: pkgconfig(opus) +%if 0%{?suse_version} >= 1550 +BuildRequires: pkgconfig(libjxl) +%endif %if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400 BuildRequires: pkgconfig(rav1e) %endif @@ -584,6 +587,9 @@ LDFLAGS="%_lto_cflags" \ --enable-libfribidi \ --enable-libgsm \ --enable-libjack \ +%if 0%{?suse_version} >= 1550 + --enable-libjxl \ +%endif --enable-libmp3lame \ %if %{with mysofa} --enable-libmysofa \ From b83adf7e99959f9c55363b20868105d9b1cc43fa4a5578f3d3f39191732809c1 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 27 Jul 2022 21:49:26 +0000 Subject: [PATCH 6/6] rework work-around-abi-break.patch and put back the original SONAME - instead go with an adjusted symverdef OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=21 --- abi_break.txt | 112 ---------------------- baselibs.conf | 16 ++-- ffmpeg-5.spec | 179 ++++++++++++++++-------------------- work-around-abi-break.patch | 52 +++++------ 4 files changed, 112 insertions(+), 247 deletions(-) delete mode 100644 abi_break.txt diff --git a/abi_break.txt b/abi_break.txt deleted file mode 100644 index 3dacf06..0000000 --- a/abi_break.txt +++ /dev/null @@ -1,112 +0,0 @@ -========================================== -abidiff /usr/lib64/libavcodec.so.59.18.100 b/usr/lib64/libavcodec.so.59.37.100 -Functions changes summary: 0 Removed, 0 Changed, 0 Added function -Variables changes summary: 0 Removed, 0 Changed, 0 Added variable -Function symbols changes summary: 1 Removed, 0 Added function symbol not referenced by debug info -Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info - -1 Removed function symbol not referenced by debug info: - - [D] avpriv_h264_has_num_reorder_frames@@LIBAVCODEC_59 - -========================================== -abidiff /usr/lib64/libavdevice.so.59.4.100 b/usr/lib64/libavdevice.so.59.7.100 - -========================================== -abidiff /usr/lib64/libavfilter.so.8.24.100 b/usr/lib64/libavfilter.so.8.44.100 -Functions changes summary: 0 Removed, 0 Changed, 0 Added function -Variables changes summary: 0 Removed, 0 Changed, 0 Added variable -Function symbols changes summary: 0 Removed, 1 Added function symbol not referenced by debug info -Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info - -1 Added function symbol not referenced by debug info: - - [A] av_buffersink_get_ch_layout@@LIBAVFILTER_8 - -========================================== -abidiff /usr/lib64/libavformat.so.59.16.100 b/usr/lib64/libavformat.so.59.27.100 -Functions changes summary: 0 Removed, 0 Changed, 0 Added function -Variables changes summary: 0 Removed, 0 Changed, 0 Added variable -Function symbols changes summary: 0 Removed, 1 Added function symbol not referenced by debug info -Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info - -1 Added function symbol not referenced by debug info: - - [A] avio_vprintf@@LIBAVFORMAT_59 - -========================================== -abidiff /usr/lib64/libavutil.so.57.17.100 b/usr/lib64/libavutil.so.57.28.100 -Functions changes summary: 0 Removed, 0 Changed, 0 Added function -Variables changes summary: 0 Removed, 0 Changed, 0 Added variable -Function symbols changes summary: 0 Removed, 47 Added function symbols not referenced by debug info -Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info - -47 Added function symbols not referenced by debug info: - - [A] av_channel_description@@LIBAVUTIL_57 - [A] av_channel_description_bprint@@LIBAVUTIL_57 - [A] av_channel_from_string@@LIBAVUTIL_57 - [A] av_channel_layout_channel_from_index@@LIBAVUTIL_57 - [A] av_channel_layout_channel_from_string@@LIBAVUTIL_57 - [A] av_channel_layout_check@@LIBAVUTIL_57 - [A] av_channel_layout_compare@@LIBAVUTIL_57 - [A] av_channel_layout_copy@@LIBAVUTIL_57 - [A] av_channel_layout_default@@LIBAVUTIL_57 - [A] av_channel_layout_describe@@LIBAVUTIL_57 - [A] av_channel_layout_describe_bprint@@LIBAVUTIL_57 - [A] av_channel_layout_from_mask@@LIBAVUTIL_57 - [A] av_channel_layout_from_string@@LIBAVUTIL_57 - [A] av_channel_layout_index_from_channel@@LIBAVUTIL_57 - [A] av_channel_layout_index_from_string@@LIBAVUTIL_57 - [A] av_channel_layout_standard@@LIBAVUTIL_57 - [A] av_channel_layout_subset@@LIBAVUTIL_57 - [A] av_channel_layout_uninit@@LIBAVUTIL_57 - [A] av_channel_name@@LIBAVUTIL_57 - [A] av_channel_name_bprint@@LIBAVUTIL_57 - [A] av_csp_luma_coeffs_from_avcsp@@LIBAVUTIL_57 - [A] av_csp_primaries_desc_from_id@@LIBAVUTIL_57 - [A] av_csp_primaries_id_from_desc@@LIBAVUTIL_57 - [A] av_dynamic_hdr_vivid_alloc@@LIBAVUTIL_57 - [A] av_dynamic_hdr_vivid_create_side_data@@LIBAVUTIL_57 - [A] av_fifo_alloc2@@LIBAVUTIL_57 - [A] av_fifo_auto_grow_limit@@LIBAVUTIL_57 - [A] av_fifo_can_read@@LIBAVUTIL_57 - [A] av_fifo_can_write@@LIBAVUTIL_57 - [A] av_fifo_drain2@@LIBAVUTIL_57 - [A] av_fifo_elem_size@@LIBAVUTIL_57 - [A] av_fifo_freep2@@LIBAVUTIL_57 - [A] av_fifo_grow2@@LIBAVUTIL_57 - [A] av_fifo_peek@@LIBAVUTIL_57 - [A] av_fifo_peek_to_cb@@LIBAVUTIL_57 - [A] av_fifo_read@@LIBAVUTIL_57 - [A] av_fifo_read_to_cb@@LIBAVUTIL_57 - [A] av_fifo_reset2@@LIBAVUTIL_57 - [A] av_fifo_write@@LIBAVUTIL_57 - [A] av_fifo_write_from_cb@@LIBAVUTIL_57 - [A] av_opt_get_chlayout@@LIBAVUTIL_57 - [A] av_opt_set_chlayout@@LIBAVUTIL_57 - [A] av_uuid_parse@@LIBAVUTIL_57 - [A] av_uuid_parse_range@@LIBAVUTIL_57 - [A] av_uuid_unparse@@LIBAVUTIL_57 - [A] av_uuid_urn_parse@@LIBAVUTIL_57 - [A] avpriv_fopen_utf8@@LIBAVUTIL_57 - -========================================== -abidiff /usr/lib64/libswresample.so.4.3.100 b/usr/lib64/libswresample.so.4.7.100 -Functions changes summary: 0 Removed, 0 Changed, 0 Added function -Variables changes summary: 0 Removed, 0 Changed, 0 Added variable -Function symbols changes summary: 0 Removed, 2 Added function symbols not referenced by debug info -Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info - -2 Added function symbols not referenced by debug info: - - [A] swr_alloc_set_opts2@@LIBSWRESAMPLE_4 - [A] swr_build_matrix2@@LIBSWRESAMPLE_4 - -========================================== -abidiff /usr/lib64/libswscale.so.6.4.100 b/usr/lib64/libswscale.so.6.7.100 - -========================================== -abidiff /usr/lib64/libpostproc.so.56.3.100 b/usr/lib64/libpostproc.so.56.6.100 - -========================================== diff --git a/baselibs.conf b/baselibs.conf index ca8f122..a152bda 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,8 +1,8 @@ -libavcodec59_37 -libavdevice59_7 -libavfilter8_44 -libavformat59_27 -libavutil57_28 -libpostproc56_6 -libswresample4_7 -libswscale6_7 +libavcodec59 +libavdevice59 +libavfilter8 +libavformat59 +libavutil57 +libpostproc56 +libswresample4 +libswscale6 diff --git a/ffmpeg-5.spec b/ffmpeg-5.spec index 008baab..7922e91 100644 --- a/ffmpeg-5.spec +++ b/ffmpeg-5.spec @@ -91,7 +91,6 @@ Source4: enable_decoders Source5: enable_encoders Source6: ffmpeg-dlopen-headers.tar.xz Source92: ffmpeg_get_dlopen_headers.sh -Source97: abi_break.txt Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-5.keyring Source99: baselibs.conf @@ -222,22 +221,14 @@ Provides: ffmpeg-tools = %version Obsoletes: ffmpeg-tools < %version Provides: ffmpeg = %version Obsoletes: ffmpeg < %version -Requires: libavcodec59_37 = %version-%release -Requires: libavdevice59_7 = %version-%release -Requires: libavfilter8_44 = %version-%release -Requires: libavformat59_27 = %version-%release -Requires: libavutil57_28 = %version-%release -Requires: libpostproc56_6 = %version-%release -Requires: libswresample4_7 = %version-%release -Requires: libswscale6_7 = %version-%release -Conflicts: libavcodec59 < %version -Conflicts: libavdevice59 < %version -Conflicts: libavfilter8 < %version -Conflicts: libavformat59 < %version -Conflicts: libavutil57 < %version -Conflicts: libpostproc56 < %version -Conflicts: libswresample4 < %version -Conflicts: libswresample6 < %version +Requires: libavcodec59 = %version-%release +Requires: libavdevice59 = %version-%release +Requires: libavfilter8 = %version-%release +Requires: libavformat59 = %version-%release +Requires: libavutil57 = %version-%release +Requires: libpostproc56 = %version-%release +Requires: libswresample4 = %version-%release +Requires: libswscale6 = %version-%release %description FFmpeg is a multimedia framework, able to decode, encode, @@ -248,11 +239,11 @@ that humans and machines have created. This build of ffmpeg is limited in the number of codecs supported. %endif -%package -n libavcodec59_37 +%package -n libavcodec59 Summary: FFmpeg codec library Group: System/Libraries -Requires: libavutil57_28 = %version-%release -Requires: libswresample4_7 = %version-%release +Requires: libavutil57 = %version-%release +Requires: libswresample4 = %version-%release %if 0%{?BUILD_ORIG} Provides: libavcodec-full = %version-%release # This can be (and is) required by packages like vlc-codecs - @@ -262,7 +253,7 @@ Provides: libavcodec59(unrestricted) # For mozillas Provides: libavcodec = %version-%release -%description -n libavcodec59_37 +%description -n libavcodec59 The libavcodec library provides a generic encoding/decoding framework and contains multiple decoders and encoders for audio, video and subtitle streams, and several bitstream filters. @@ -277,7 +268,7 @@ Group: Development/Libraries/C and C++ Provides: libavcodec-devel = %version-%release Obsoletes: libavcodec-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libavcodec59_37 = %version-%release +Requires: libavcodec59 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -288,15 +279,15 @@ subtitle streams, and several bitstream filters. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavdevice59_7 +%package -n libavdevice59 Summary: FFmpeg device library Group: System/Libraries -Requires: libavcodec59_37 = %version-%release -Requires: libavfilter8_44 = %version-%release -Requires: libavformat59_27 = %version-%release -Requires: libavutil57_28 = %version-%release +Requires: libavcodec59 = %version-%release +Requires: libavfilter8 = %version-%release +Requires: libavformat59 = %version-%release +Requires: libavutil57 = %version-%release -%description -n libavdevice59_7 +%description -n libavdevice59 The libavdevice library provides a generic framework for grabbing from and rendering to many common multimedia input/output devices, and supports several input and output devices, including Video4Linux2, VfW, @@ -316,7 +307,7 @@ Requires: %name-libavutil-devel = %version-%release Requires: %name-libpostproc-devel = %version-%release Requires: %name-libswresample-devel = %version-%release Requires: %name-libswscale-devel = %version-%release -Requires: libavdevice59_7 = %version-%release +Requires: libavdevice59 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -328,17 +319,17 @@ DShow, and ALSA. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavfilter8_44 +%package -n libavfilter8 Summary: FFmpeg audio and video filtering library Group: System/Libraries -Requires: libavcodec59_37 = %version-%release -Requires: libavformat59_27 = %version-%release -Requires: libavutil57_28 = %version-%release -Requires: libpostproc56_6 = %version-%release -Requires: libswresample4_7 = %version-%release -Requires: libswscale6_7 = %version-%release +Requires: libavcodec59 = %version-%release +Requires: libavformat59 = %version-%release +Requires: libavutil57 = %version-%release +Requires: libpostproc56 = %version-%release +Requires: libswresample4 = %version-%release +Requires: libswscale6 = %version-%release -%description -n libavfilter8_44 +%description -n libavfilter8 The libavfilter library provides a generic audio/video filtering framework containing several filters, sources and sinks. @@ -353,7 +344,7 @@ Requires: %name-libavutil-devel = %version-%release Requires: %name-libpostproc-devel = %version-%release Requires: %name-libswresample-devel = %version-%release Requires: %name-libswscale-devel = %version-%release -Requires: libavfilter8_44 = %version-%release +Requires: libavfilter8 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -363,13 +354,13 @@ framework containing several filters, sources and sinks. This subpackage contains the headers for FFmpeg libavfilter. -%package -n libavformat59_27 +%package -n libavformat59 Summary: FFmpeg's stream format library Group: System/Libraries -Requires: libavcodec59_37 = %version-%release -Requires: libavutil57_28 = %version-%release +Requires: libavcodec59 = %version-%release +Requires: libavutil57 = %version-%release -%description -n libavformat59_27 +%description -n libavformat59 The libavformat library provides a generic framework for multiplexing and demultiplexing (muxing and demuxing) audio, video and subtitle streams. It encompasses multiple muxers and demuxers for multimedia @@ -387,7 +378,7 @@ Obsoletes: libavformat-devel < %version-%release Requires: %name-libavcodec-devel = %version-%release Requires: %name-libavutil-devel = %version-%release Requires: %name-libswresample-devel = %version-%release -Requires: libavformat59_27 = %version-%release +Requires: libavformat59 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -399,11 +390,11 @@ container formats. This subpackage contains the headers for FFmpeg libavformat. -%package -n libavutil57_28 +%package -n libavutil57 Summary: FFmpeg's utility library Group: System/Libraries -%description -n libavutil57_28 +%description -n libavutil57 The libavutil library is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, @@ -415,7 +406,7 @@ Summary: Development files for FFmpeg's utility library Group: Development/Libraries/C and C++ Provides: libavutil-devel = %version-%release Obsoletes: libavutil-devel < %version-%release -Requires: libavutil57_28 = %version-%release +Requires: libavutil57 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -428,12 +419,12 @@ for pixel and sample formats). This subpackage contains the headers for FFmpeg libavutil. -%package -n libpostproc56_6 +%package -n libpostproc56 Summary: FFmpeg post-processing library Group: System/Libraries -Requires: libavutil57_28 = %version-%release +Requires: libavutil57 = %version-%release -%description -n libpostproc56_6 +%description -n libpostproc56 A library with video postprocessing filters, such as deblocking and deringing filters, noise reduction, automatic contrast and brightness correction, linear/cubic interpolating deinterlacing. @@ -444,7 +435,7 @@ Group: Development/Libraries/C and C++ Provides: libpostproc-devel = %version-%release Obsoletes: libpostproc-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libpostproc56_6 = %version-%release +Requires: libpostproc56 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -455,12 +446,12 @@ correction, linear/cubic interpolating deinterlacing. This subpackage contains the headers for FFmpeg libpostproc. -%package -n libswresample4_7 +%package -n libswresample4 Summary: FFmpeg software resampling library Group: System/Libraries -Requires: libavutil57_28 = %version-%release +Requires: libavutil57 = %version-%release -%description -n libswresample4_7 +%description -n libswresample4 The libswresample library performs audio conversion between different sample rates, channel layout and channel formats. @@ -470,7 +461,7 @@ Group: Development/Libraries/C and C++ Provides: libswresample-devel = %version-%release Obsoletes: libswresample-devel < %version-%release Requires: %name-libavutil-devel = %version-%release -Requires: libswresample4_7 = %version-%release +Requires: libswresample4 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -480,12 +471,12 @@ sample rates, channel layout and channel formats. This subpackage contains the headers for FFmpeg libswresample. -%package -n libswscale6_7 +%package -n libswscale6 Summary: FFmpeg image scaling and colorspace/pixel conversion library Group: System/Libraries -Requires: libavutil57_28 = %version-%release +Requires: libavutil57 = %version-%release -%description -n libswscale6_7 +%description -n libswscale6 The libswscale library performs image scaling and colorspace and pixel format conversion operations. @@ -495,7 +486,7 @@ Group: Development/Libraries/C and C++ Provides: libswscale-devel = %version-%release Conflicts: libswscale-devel Requires: %name-libavutil-devel = %version-%release -Requires: libswscale6_7 = %version-%release +Requires: libswscale6 = %version-%release %devel_conflicts -c < -v %_major_version %devel_conflicts -c >= -v %_major_expected @@ -703,68 +694,60 @@ for i in libavformat/options_table.h libavformat/os_support.h \ cp -a $i "$b/%_includedir/ffmpeg/private/$i" done -%post -n libavcodec59_37 -p /sbin/ldconfig -%postun -n libavcodec59_37 -p /sbin/ldconfig -%post -n libavdevice59_7 -p /sbin/ldconfig -%postun -n libavdevice59_7 -p /sbin/ldconfig -%post -n libavfilter8_44 -p /sbin/ldconfig -%postun -n libavfilter8_44 -p /sbin/ldconfig -%post -n libavformat59_27 -p /sbin/ldconfig -%postun -n libavformat59_27 -p /sbin/ldconfig -%post -n libavutil57_28 -p /sbin/ldconfig -%postun -n libavutil57_28 -p /sbin/ldconfig -%post -n libpostproc56_6 -p /sbin/ldconfig -%postun -n libpostproc56_6 -p /sbin/ldconfig -%post -n libswresample4_7 -p /sbin/ldconfig -%postun -n libswresample4_7 -p /sbin/ldconfig -%post -n libswscale6_7 -p /sbin/ldconfig -%postun -n libswscale6_7 -p /sbin/ldconfig +%post -n libavcodec59 -p /sbin/ldconfig +%postun -n libavcodec59 -p /sbin/ldconfig +%post -n libavdevice59 -p /sbin/ldconfig +%postun -n libavdevice59 -p /sbin/ldconfig +%post -n libavfilter8 -p /sbin/ldconfig +%postun -n libavfilter8 -p /sbin/ldconfig +%post -n libavformat59 -p /sbin/ldconfig +%postun -n libavformat59 -p /sbin/ldconfig +%post -n libavutil57 -p /sbin/ldconfig +%postun -n libavutil57 -p /sbin/ldconfig +%post -n libpostproc56 -p /sbin/ldconfig +%postun -n libpostproc56 -p /sbin/ldconfig +%post -n libswresample4 -p /sbin/ldconfig +%postun -n libswresample4 -p /sbin/ldconfig +%post -n libswscale6 -p /sbin/ldconfig +%postun -n libswscale6 -p /sbin/ldconfig %files %doc Changelog CREDITS README.md %_bindir/* %_mandir/man1/ff*.1* %_datadir/ffmpeg/ -%_libdir/libavcodec.so.59 -%_libdir/libavdevice.so.59 -%_libdir/libavfilter.so.8 -%_libdir/libavformat.so.59 -%_libdir/libavutil.so.57 -%_libdir/libpostproc.so.56 -%_libdir/libswresample.so.4 -%_libdir/libswscale.so.6 -%files -n libavcodec59_37 +%files -n libavcodec59 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavcodec.so.59.* +%_libdir/libavcodec.so.* -%files -n libavdevice59_7 +%files -n libavdevice59 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavdevice.so.59.* +%_libdir/libavdevice.so.* -%files -n libavfilter8_44 +%files -n libavfilter8 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavfilter.so.8.* +%_libdir/libavfilter.so.* -%files -n libavformat59_27 +%files -n libavformat59 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavformat.so.59.* +%_libdir/libavformat.so.* -%files -n libavutil57_28 +%files -n libavutil57 %license COPYING.GPLv2 LICENSE.md -%_libdir/libavutil.so.57.* +%_libdir/libavutil.so.* -%files -n libpostproc56_6 +%files -n libpostproc56 %license COPYING.GPLv2 LICENSE.md -%_libdir/libpostproc.so.56.* +%_libdir/libpostproc.so.* -%files -n libswresample4_7 +%files -n libswresample4 %license COPYING.GPLv2 LICENSE.md -%_libdir/libswresample.so.4.* +%_libdir/libswresample.so.* -%files -n libswscale6_7 +%files -n libswscale6 %license COPYING.GPLv2 LICENSE.md -%_libdir/libswscale.so.6.* +%_libdir/libswscale.so.* %files libavcodec-devel %dir %_includedir/ffmpeg/ diff --git a/work-around-abi-break.patch b/work-around-abi-break.patch index d3b6fbd..edb250a 100644 --- a/work-around-abi-break.patch +++ b/work-around-abi-break.patch @@ -10,18 +10,12 @@ aspects. [...]""" Further discussion on the mailing list explored this topic, and revealed that ELF symbol versioning is lacklusterly implemented in ffmpeg, which can cause inadvertent mixing of library versions on -openSUSE, and precompiled Linux distributions in general. It is -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. +openSUSE, and precompiled Linux distributions in general. -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. - -[2022-07-23: ffmpeg is at it again! Reinstate the patch. +Upstream says "we only add new functions" - which is ok in its own +right. verdefs, if you have them, *must*not* change under any +circumstances, but that is what they broke: the set of symbols +included in the "LIBAVFORMAT_59" verdef changed between 5.0 and 5.1. $ abidiff abidiff /usr/lib64/libavformat.so.59.16.100 usr/lib64/libavformat.so.59.27.100 Functions changes summary: 0 Removed, 0 Changed, 0 Added function @@ -35,24 +29,24 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen ] ---- - configure | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) +Henceforth, we're changing the .v files such that the symbol set in +any one verdef we will ever emit is never modified in future +releases. -Index: ffmpeg-4.4.1/configure +--- + ffbuild/library.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ffmpeg-5.1/ffbuild/library.mak =================================================================== ---- ffmpeg-4.4.1.orig/configure -+++ ffmpeg-4.4.1/configure -@@ -3834,10 +3834,10 @@ SLIBPREF="lib" - SLIBSUF=".so" - SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)' - SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)' --SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)' -+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) $(SLIBNAME).$(LIBMAJOR)' - VERSION_SCRIPT_POSTPROCESS_CMD="cat" +--- ffmpeg-5.1.orig/ffbuild/library.mak ++++ ffmpeg-5.1/ffbuild/library.mak +@@ -59,7 +59,7 @@ $(SUBDIR)lib$(FULLNAME).pc: $(SUBDIR)ver + $$(M) $$(SRC_PATH)/ffbuild/pkgconfig_generate.sh $(NAME) "$(DESC)" - asflags_filter=echo + $(SUBDIR)lib$(NAME).ver: $(SUBDIR)lib$(NAME).v $(OBJS) +- $$(M)sed 's/MAJOR/$(lib$(NAME)_VERSION_MAJOR)/' $$< | $(VERSION_SCRIPT_POSTPROCESS_CMD) > $$@ ++ $$(M)sed 's/MAJOR/$(lib$(NAME)_VERSION_MAJOR).$(lib$(NAME)_VERSION_MINOR)_SUSE/' $$< | $(VERSION_SCRIPT_POSTPROCESS_CMD) > $$@ + + $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) + $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)