SHA256
1
0
forked from pool/ffmpeg-5

Accepting request 991461 from multimedia:libs

- 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

OBS-URL: https://build.opensuse.org/request/show/991461
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ffmpeg-5?expand=0&rev=3
This commit is contained in:
Richard Brown 2022-07-28 18:58:57 +00:00 committed by Git OBS Bridge
commit 653466fcba
12 changed files with 191 additions and 158 deletions

View File

@ -1,3 +1,10 @@
From: Ismail Dönmez <ismail@i10z.com>
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));

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b
size 9812524

View File

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

3
ffmpeg-5.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:55eb6aab5ee235550fa54a33eaf8bf1b4ec66c01453182b12f6a993d75698b03
size 10001864

11
ffmpeg-5.1.tar.xz.asc Normal file
View File

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

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Tue Jul 26 18:55:46 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Enable libjxl
-------------------------------------------------------------------
Sat Jul 23 15:29:58 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Update ffmpeg-chromium.patch from upstream
-------------------------------------------------------------------
Sat Jul 23 08:35:20 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- 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 <dmueller@suse.com>

View File

@ -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
@ -98,10 +98,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
@ -156,6 +155,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
@ -576,6 +578,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 \
@ -658,7 +663,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
@ -714,35 +719,35 @@ done
%files -n libavcodec59
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavcodec.so.59*
%_libdir/libavcodec.so.*
%files -n libavdevice59
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavdevice.so.59*
%_libdir/libavdevice.so.*
%files -n libavfilter8
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavfilter.so.8*
%_libdir/libavfilter.so.*
%files -n libavformat59
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavformat.so.59*
%_libdir/libavformat.so.*
%files -n libavutil57
%license COPYING.GPLv2 LICENSE.md
%_libdir/libavutil.so.57*
%_libdir/libavutil.so.*
%files -n libpostproc56
%license COPYING.GPLv2 LICENSE.md
%_libdir/libpostproc.so.56*
%_libdir/libpostproc.so.*
%files -n libswresample4
%license COPYING.GPLv2 LICENSE.md
%_libdir/libswresample.so.4*
%_libdir/libswresample.so.*
%files -n libswscale6
%license COPYING.GPLv2 LICENSE.md
%_libdir/libswscale.so.6*
%_libdir/libswscale.so.*
%files libavcodec-devel
%dir %_includedir/ffmpeg/

View File

@ -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/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,12 +26,12 @@ 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
Index: ffmpeg-5.1/libavformat/utils.c
===================================================================
--- ffmpeg-5.1.orig/libavformat/utils.c
+++ ffmpeg-5.1/libavformat/utils.c
@@ -121,6 +121,13 @@
return AV_NOPTS_VALUE;
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
}
+// Chromium: We use the internal field first_dts vvv
@ -36,6 +41,6 @@ index de7580c..0ef0fe5 100644
+}
+// 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)

View File

@ -12,22 +12,22 @@ Co-authored-by: Neal Gompa <ngompa@fedoraproject.org>
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
---
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 <wels/codec_ver.h>
+#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

View File

@ -1,38 +0,0 @@
From b3b0ff6ef4b5bb3e2bf9649f1d7130f123f90099 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
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 <asn@cryptomilk.org>
---
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");

View File

@ -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},

View File

@ -0,0 +1,52 @@
From: Jan Engelhardt <jengelh@inai.de>
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.
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
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
]
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.
---
ffbuild/library.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: ffmpeg-5.1/ffbuild/library.mak
===================================================================
--- 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)"
$(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)