Merge branch 'f42' into epel9
This commit is contained in:
commit
d8e0fc076d
16 changed files with 481 additions and 4820 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -2,3 +2,5 @@ ffmpeg-*.asc
|
|||
ffmpeg-*.rpm
|
||||
ffmpeg-*.tar.xz
|
||||
/ffmpeg.keyring
|
||||
/results_*
|
||||
/*.rpm
|
||||
|
|
|
|||
|
|
@ -1,109 +0,0 @@
|
|||
From a641e629591d68bd3edd99bddec623dc31295f6b Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <klember@redhat.com>
|
||||
Date: Wed, 6 Dec 2023 14:37:34 +0100
|
||||
Subject: [PATCH] lavc/libopenh264: Drop openh264 runtime version checks
|
||||
|
||||
Years ago, openh264 releases often changed their ABI without changing
|
||||
the library soname. To avoid running into ABI issues, a version check
|
||||
was added to lavc libopenh264 code to error out at runtime in case the
|
||||
build time and runtime openh264 versions don't match.
|
||||
|
||||
This should no longer be an issue with newer openh264 releases and we
|
||||
can drop the runtime version check and rely on upstream doing the right
|
||||
thing and bump the library soname if the ABI changes, similar to how
|
||||
other libraries are consumed in ffmpeg.
|
||||
|
||||
Almost all major distributions now include openh264 and this means there
|
||||
are more eyes on ABI changes and issues are discovered and reported
|
||||
quickly. See e.g. https://github.com/cisco/openh264/issues/3564 where an
|
||||
ABI issue was quickly discovered and fixed.
|
||||
|
||||
Relaxing the check allows downstream distributions to build ffmpeg
|
||||
against e.g. openh264 2.3.1 and ship an update to ABI-compatible
|
||||
openh264 2.4.0, without needing to coordinate a lock step update between
|
||||
ffmpeg and openh264 (which can be difficult if openh264 is distributed
|
||||
by Cisco and ffmpeg comes from the distro, such as is the case for
|
||||
Fedora).
|
||||
|
||||
Signed-off-by: Kalev Lember <klember@redhat.com>
|
||||
---
|
||||
libavcodec/libopenh264.c | 15 ---------------
|
||||
libavcodec/libopenh264.h | 2 --
|
||||
libavcodec/libopenh264dec.c | 4 ----
|
||||
libavcodec/libopenh264enc.c | 4 ----
|
||||
4 files changed, 25 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/libopenh264.c b/libavcodec/libopenh264.c
|
||||
index 0f6d28ed88..c80c85ea8b 100644
|
||||
--- a/libavcodec/libopenh264.c
|
||||
+++ b/libavcodec/libopenh264.c
|
||||
@@ -46,18 +46,3 @@ void ff_libopenh264_trace_callback(void *ctx, int level, const char *msg)
|
||||
int equiv_ffmpeg_log_level = libopenh264_to_ffmpeg_log_level(level);
|
||||
av_log(ctx, equiv_ffmpeg_log_level, "%s\n", msg);
|
||||
}
|
||||
-
|
||||
-int ff_libopenh264_check_version(void *logctx)
|
||||
-{
|
||||
- // Mingw GCC < 4.7 on x86_32 uses an incorrect/buggy ABI for the WelsGetCodecVersion
|
||||
- // 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)
|
||||
- OpenH264Version libver = WelsGetCodecVersion();
|
||||
- if (memcmp(&libver, &g_stCodecVersion, sizeof(libver))) {
|
||||
- av_log(logctx, AV_LOG_ERROR, "Incorrect library version loaded\n");
|
||||
- return AVERROR(EINVAL);
|
||||
- }
|
||||
-#endif
|
||||
- return 0;
|
||||
-}
|
||||
diff --git a/libavcodec/libopenh264.h b/libavcodec/libopenh264.h
|
||||
index dbb9c5d429..0b462d6fdc 100644
|
||||
--- a/libavcodec/libopenh264.h
|
||||
+++ b/libavcodec/libopenh264.h
|
||||
@@ -34,6 +34,4 @@
|
||||
|
||||
void ff_libopenh264_trace_callback(void *ctx, int level, const char *msg);
|
||||
|
||||
-int ff_libopenh264_check_version(void *logctx);
|
||||
-
|
||||
#endif /* AVCODEC_LIBOPENH264_H */
|
||||
diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
|
||||
index 7d650ae03e..b6a9bba2dc 100644
|
||||
--- a/libavcodec/libopenh264dec.c
|
||||
+++ b/libavcodec/libopenh264dec.c
|
||||
@@ -52,13 +52,9 @@ static av_cold int svc_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
SVCContext *s = avctx->priv_data;
|
||||
SDecodingParam param = { 0 };
|
||||
- int err;
|
||||
int log_level;
|
||||
WelsTraceCallback callback_function;
|
||||
|
||||
- if ((err = ff_libopenh264_check_version(avctx)) < 0)
|
||||
- return AVERROR_DECODER_NOT_FOUND;
|
||||
-
|
||||
if (WelsCreateDecoder(&s->decoder)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n");
|
||||
return AVERROR_UNKNOWN;
|
||||
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
|
||||
index f518d0894e..6f231d22b2 100644
|
||||
--- a/libavcodec/libopenh264enc.c
|
||||
+++ b/libavcodec/libopenh264enc.c
|
||||
@@ -110,14 +110,10 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
|
||||
{
|
||||
SVCContext *s = avctx->priv_data;
|
||||
SEncParamExt param = { 0 };
|
||||
- int err;
|
||||
int log_level;
|
||||
WelsTraceCallback callback_function;
|
||||
AVCPBProperties *props;
|
||||
|
||||
- if ((err = ff_libopenh264_check_version(avctx)) < 0)
|
||||
- return AVERROR_ENCODER_NOT_FOUND;
|
||||
-
|
||||
if (WelsCreateSVCEncoder(&s->encoder)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unable to create encoder\n");
|
||||
return AVERROR_UNKNOWN;
|
||||
--
|
||||
2.43.0
|
||||
|
||||
21
README.md
21
README.md
|
|
@ -5,24 +5,3 @@ demux, stream, filter and play pretty much anything that humans and machines
|
|||
have created. It supports the most obscure ancient formats up to the cutting
|
||||
edge. No matter if they were designed by some standards committee, the
|
||||
community or a corporation.
|
||||
|
||||
## Creating the 'free' tarball
|
||||
|
||||
1. Update the `Version` in the spec file.
|
||||
2. Set the `Release` to 0 in the spec file.
|
||||
3. Set `pkg_suffix` to `%nil`
|
||||
4. Do a full build locally: `fedpkg mockbuild --with full_build`
|
||||
5. Run `./ffmpeg_update_free_sources.sh results_ffmpeg/5.0/0.fc35/build.log`
|
||||
This will update the `ffmpeg_free_sources` file list.
|
||||
Note that header files will need to be manually added
|
||||
to the `ffmpeg_free_sources` file list.
|
||||
6. Run `./ffmpeg_gen_free_tarball.sh` to create the tarball.
|
||||
7. Set `pkg_suffix` to `-free` again
|
||||
8. Set the `Release` to 1 in the spec file.
|
||||
9. Do a scratch build.
|
||||
|
||||
OR
|
||||
|
||||
1. Edit `ffmpeg_free_sources` and add missing files
|
||||
2. Run `./ffmpeg_gen_free_tarball.sh` to create the tarball.
|
||||
3. Do a scratch build.
|
||||
|
|
|
|||
|
|
@ -54,8 +54,10 @@ adpcm_thp
|
|||
adpcm_thp_le
|
||||
adpcm_vima
|
||||
adpcm_xa
|
||||
adpcm_xmd
|
||||
adpcm_yamaha
|
||||
adpcm_zork
|
||||
aic
|
||||
alac
|
||||
alias_pix
|
||||
amrnb
|
||||
|
|
@ -63,6 +65,8 @@ amrwb
|
|||
amv
|
||||
anm
|
||||
ansi # trivial
|
||||
anull
|
||||
apac
|
||||
ape
|
||||
apng # animated png
|
||||
arbc
|
||||
|
|
@ -79,7 +83,6 @@ aura
|
|||
aura2
|
||||
av1 # libaom
|
||||
av1_qsv # libaom
|
||||
ayuv # trivial
|
||||
bethsoftvid # trivial
|
||||
bfi # trivial
|
||||
bink
|
||||
|
|
@ -90,8 +93,10 @@ bitpacked # trivial
|
|||
bmp # trivial
|
||||
bmv_audio
|
||||
bmv_video
|
||||
bonk
|
||||
brender_pix
|
||||
c93
|
||||
cbd2_dpcm
|
||||
ccaption
|
||||
cdgraphics
|
||||
cdtoons
|
||||
|
|
@ -110,6 +115,7 @@ dfa
|
|||
dfpwm
|
||||
dirac # dirac
|
||||
dnxhd
|
||||
dnxhr
|
||||
dolby_e
|
||||
dpx
|
||||
dsd_lsbf
|
||||
|
|
@ -146,6 +152,7 @@ flic
|
|||
flv
|
||||
fmvc
|
||||
fourxm
|
||||
ftr # fdk-aac
|
||||
g723_1
|
||||
g729
|
||||
gdv
|
||||
|
|
@ -157,12 +164,13 @@ gsm_ms
|
|||
gsm_ms_at
|
||||
h261
|
||||
h263
|
||||
h263_v4l2m2m
|
||||
h263_v4l2m2m # hardware
|
||||
h263i
|
||||
h263p
|
||||
hap
|
||||
hca
|
||||
hcom
|
||||
hdr
|
||||
hnm4_video
|
||||
hq_hqa
|
||||
hqx
|
||||
|
|
@ -189,6 +197,8 @@ jv
|
|||
kgv1
|
||||
kmvc
|
||||
lagarith
|
||||
libaribb24 # aribb24
|
||||
libaribcaption # libaribcaption
|
||||
libaom # libaom
|
||||
libaom_av1 # libaom
|
||||
libcodec2 # codec2
|
||||
|
|
@ -197,6 +207,7 @@ libgsm # libgsm
|
|||
libgsm_ms # libgsm
|
||||
libilbc # ilbc
|
||||
libjxl # libjxl
|
||||
liblc3 # liblc3
|
||||
libopencore_amrnb # opencore-amr
|
||||
libopencore_amrwb # opencore-amr
|
||||
libopenh264 # openh264_dlopen
|
||||
|
|
@ -215,9 +226,11 @@ m101
|
|||
mace3
|
||||
mace6
|
||||
mdec
|
||||
media100
|
||||
metasound
|
||||
microdvd
|
||||
mimic
|
||||
misc4
|
||||
mjpeg # mjpegtools
|
||||
mjpeg_qsv # mjpegtools
|
||||
mjpegb
|
||||
|
|
@ -236,13 +249,13 @@ mp3on4
|
|||
mp3on4float
|
||||
mpc7
|
||||
mpc8
|
||||
mpeg1video
|
||||
mpeg1_v4l2m2m
|
||||
mpeg2video
|
||||
mpeg1video
|
||||
mpeg2_qsv
|
||||
mpeg2_v4l2m2m
|
||||
mpeg2video
|
||||
mpeg4
|
||||
mpeg4_v4l2m2m
|
||||
mpeg4_v4l2m2m # hardware
|
||||
mpegvideo
|
||||
mpl2
|
||||
msa1
|
||||
|
|
@ -320,6 +333,7 @@ pictor
|
|||
pjs
|
||||
png # libpng
|
||||
ppm # trivial
|
||||
prores
|
||||
prosumer
|
||||
psd
|
||||
ptx
|
||||
|
|
@ -327,6 +341,7 @@ qcelp
|
|||
qdm2
|
||||
qdmc
|
||||
qdraw
|
||||
qoa
|
||||
qoi
|
||||
qpeg
|
||||
qtrle
|
||||
|
|
@ -337,6 +352,7 @@ ra_288
|
|||
rasc
|
||||
rawvideo # trivial
|
||||
realtext
|
||||
rka
|
||||
rl2
|
||||
roq
|
||||
roq_dpcm
|
||||
|
|
@ -409,6 +425,7 @@ vcr1
|
|||
vmdaudio
|
||||
vmdvideo
|
||||
vmnc
|
||||
vnull
|
||||
vorbis # libvorbis
|
||||
vp3 # libav
|
||||
vp4 # libav
|
||||
|
|
@ -425,7 +442,11 @@ vp9_qsv # libvpx
|
|||
vp9_v4l2m2m # libvpx
|
||||
vplayer
|
||||
vqa
|
||||
vqc
|
||||
wady_dpcm
|
||||
wavarc
|
||||
wavpack
|
||||
wbmp
|
||||
wcmv
|
||||
webp # libwebp
|
||||
webvtt # trivial
|
||||
|
|
|
|||
|
|
@ -22,11 +22,15 @@ adpcm_yamaha
|
|||
alac
|
||||
alias_pix
|
||||
amv
|
||||
anull
|
||||
apng # libpng
|
||||
ass # trivial
|
||||
asv1
|
||||
asv2
|
||||
ayuv # trival
|
||||
av1_amf
|
||||
av1_nvenc
|
||||
av1_qsv
|
||||
av1_vaapi
|
||||
bitpacked # trivial
|
||||
bmp # trivial
|
||||
cinepak
|
||||
|
|
@ -34,6 +38,7 @@ cljr
|
|||
dca
|
||||
dfpwm
|
||||
dnxhd
|
||||
dnxhr
|
||||
dpx
|
||||
dvbsub
|
||||
dvdsub
|
||||
|
|
@ -57,6 +62,7 @@ h264_qsv # hardware
|
|||
h264_v4l2m2m # hardware
|
||||
h264_vaapi # hardware
|
||||
hap
|
||||
hdr
|
||||
hevc_amf # hardware
|
||||
hevc_nvenc # hardware
|
||||
hevc_qsv # hardware
|
||||
|
|
@ -64,22 +70,22 @@ hevc_v4l2m2m # hardware
|
|||
hevc_vaapi # hardware
|
||||
huffyuv # trivial+zlib
|
||||
ilbc # ilbc
|
||||
jpegls
|
||||
jpeg2000
|
||||
libaom # libaom
|
||||
jpegls
|
||||
libaom
|
||||
libaom_av1 # libaom
|
||||
libcodec2 # codec2
|
||||
libgsm # libgsm
|
||||
libgsm_ms # libgsm
|
||||
libilbc # ilbc
|
||||
libjxl # libjxl
|
||||
liblc3 # liblc3
|
||||
libmp3lame # lame
|
||||
libopencore_amrnb
|
||||
libopenh264 # openh264_dlopen
|
||||
libopenjpeg # openjpeg
|
||||
libopus # opus
|
||||
librav1e # rav1e
|
||||
libschroedinger # schroedinger
|
||||
libspeex # speex
|
||||
libsvtav1
|
||||
libtheora # libtheora
|
||||
|
|
@ -98,9 +104,9 @@ mlp
|
|||
mp2 # twolame
|
||||
mp2fixed # twolame
|
||||
mpeg1video
|
||||
mpeg2video
|
||||
mpeg2_qsv
|
||||
mpeg2_vaapi
|
||||
mpeg2video
|
||||
mpeg4
|
||||
mpeg4_v4l2m2m # hardware
|
||||
msmpeg4v2
|
||||
|
|
@ -141,6 +147,9 @@ pgmyuv # trivial
|
|||
phm # trivial
|
||||
png # libpng
|
||||
ppm # trivial
|
||||
prores
|
||||
prores_aw
|
||||
prores_ks
|
||||
qoi
|
||||
qtrle
|
||||
r10k # trivial
|
||||
|
|
@ -179,6 +188,7 @@ v410 # trivial
|
|||
vc1_qsv # hardware
|
||||
vc1_v4l2m2m # hardware
|
||||
vc2 # dirac
|
||||
vnull
|
||||
vorbis # libvorbis
|
||||
vp8_qsv # libvpx
|
||||
vp8_v4l2m2m # libvpx
|
||||
|
|
@ -186,6 +196,7 @@ vp8_vaapi # libvpx
|
|||
vp9_qsv # libvpx
|
||||
vp9_vaapi # libvpx
|
||||
wavpack
|
||||
wbmp
|
||||
webvtt # trivial
|
||||
wmav1
|
||||
wmav2
|
||||
|
|
|
|||
29
ffmpeg-CVE-2025-22921.patch
Normal file
29
ffmpeg-CVE-2025-22921.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
From 7f9c7f9849a2155224711f0ff57ecdac6e4bfb57 Mon Sep 17 00:00:00 2001
|
||||
From: James Almer <jamrial@gmail.com>
|
||||
Date: Wed, 1 Jan 2025 23:58:39 -0300
|
||||
Subject: [PATCH] avcodec/jpeg2000dec: clear array length when freeing it
|
||||
|
||||
Fixes NULL pointer dereferences.
|
||||
Fixes ticket #11393.
|
||||
|
||||
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
|
||||
Signed-off-by: James Almer <jamrial@gmail.com>
|
||||
---
|
||||
libavcodec/jpeg2000dec.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
|
||||
index e5e897a29f..b82d85d5ee 100644
|
||||
--- a/libavcodec/jpeg2000dec.c
|
||||
+++ b/libavcodec/jpeg2000dec.c
|
||||
@@ -1521,6 +1521,7 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
|
||||
}
|
||||
}
|
||||
av_freep(&cblk->lengthinc);
|
||||
+ cblk->nb_lengthinc = 0;
|
||||
}
|
||||
}
|
||||
// Save state of stream
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
|
@ -4,23 +4,24 @@ fdk-aac-free-devel is GPL compatible
|
|||
|
||||
See https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112
|
||||
|
||||
Index: ffmpeg-5.0/configure
|
||||
Index: ffmpeg-7.0/configure
|
||||
===================================================================
|
||||
--- ffmpeg-5.0.orig/configure 2022-02-09 20:07:49.490888877 +0100
|
||||
+++ ffmpeg-5.0/configure 2022-02-09 20:08:30.102854308 +0100
|
||||
@@ -1783,7 +1783,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
|
||||
|
||||
--- ffmpeg-7.0.orig/configure 2022-02-09 20:07:49.490888877 +0100
|
||||
+++ ffmpeg-7.0/configure 2022-02-09 20:08:30.102854308 +0100
|
||||
@@ -1872,7 +1872,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
|
||||
|
||||
EXTERNAL_LIBRARY_NONFREE_LIST="
|
||||
decklink
|
||||
- libfdk_aac
|
||||
libtls
|
||||
"
|
||||
|
||||
@@ -1822,6 +1821,7 @@ EXTERNAL_LIBRARY_LIST="
|
||||
|
||||
@@ -1912,6 +1911,7 @@ EXTERNAL_LIBRARY_LIST="
|
||||
libcodec2
|
||||
libdav1d
|
||||
libdc1394
|
||||
libdrm
|
||||
+ libfdk_aac
|
||||
libflite
|
||||
libfontconfig
|
||||
libfreetype
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
From 4464ecf750bb9440e2571a8d810627cdec85ae02 Mon Sep 17 00:00:00 2001
|
||||
From d32aacab65a322b66d6a1b48f6cdb03e42bde0f9 Mon Sep 17 00:00:00 2001
|
||||
From: Frank Liberato <liberato@chromium.org>
|
||||
Date: Wed, 7 Jul 2021 19:01:22 -0700
|
||||
Subject: [PATCH] Add av_stream_get_first_dts for Chromium
|
||||
|
|
@ -9,38 +9,38 @@ Subject: [PATCH] Add av_stream_get_first_dts for Chromium
|
|||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
|
||||
index f12fa7d904..0b9fd1f061 100644
|
||||
index 1916aa2dc5..e6682849fa 100644
|
||||
--- a/libavformat/avformat.h
|
||||
+++ b/libavformat/avformat.h
|
||||
@@ -1128,6 +1128,10 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
|
||||
*/
|
||||
int64_t av_stream_get_end_pts(const AVStream *st);
|
||||
|
||||
@@ -1170,6 +1170,10 @@ typedef struct AVStreamGroup {
|
||||
|
||||
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
|
||||
|
||||
+// Chromium: We use the internal field first_dts vvv
|
||||
+int64_t av_stream_get_first_dts(const AVStream *st);
|
||||
+// Chromium: We use the internal field first_dts ^^^
|
||||
+
|
||||
#define AV_PROGRAM_RUNNING 1
|
||||
|
||||
|
||||
/**
|
||||
diff --git a/libavformat/utils.c b/libavformat/utils.c
|
||||
index cf4d68bff9..7d750abf88 100644
|
||||
--- a/libavformat/utils.c
|
||||
+++ b/libavformat/utils.c
|
||||
@@ -55,6 +55,13 @@ int ff_unlock_avformat(void)
|
||||
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
|
||||
}
|
||||
@@ -56,6 +56,13 @@ int ff_unlock_avformat(void)
|
||||
* various utility functions for use within FFmpeg
|
||||
*/
|
||||
|
||||
+// Chromium: We use the internal field first_dts vvv
|
||||
+int64_t av_stream_get_first_dts(const AVStream *st)
|
||||
+{
|
||||
+ return cffstream(st)->first_dts;
|
||||
+ return cffstream(st)->first_dts;
|
||||
+}
|
||||
+// Chromium: We use the internal field first_dts ^^^
|
||||
+
|
||||
/* an arbitrarily chosen "sane" max packet size -- 50M */
|
||||
#define SANE_CHUNK_SIZE (50000000)
|
||||
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
||||
|
|
|
|||
|
|
@ -2,55 +2,57 @@ From: Jan Engelhardt <jengelh@inai.de>
|
|||
|
||||
Edit the default codec selection such that
|
||||
|
||||
ffmpeg -i youtube.blah.webm foobar.mkv
|
||||
ffmpeg -i youtube.blah.webm foobar.mkv
|
||||
|
||||
without any further arguments can produce a result even on a
|
||||
reduced codec selection list.
|
||||
|
||||
---
|
||||
libavformat/matroskaenc.c | 19 +++++++++++++------
|
||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||
libavformat/matroskaenc.c | 20 ++++++++++++++------
|
||||
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: ffmpeg-5.0/libavformat/matroskaenc.c
|
||||
Index: ffmpeg-7.0/libavformat/matroskaenc.c
|
||||
===================================================================
|
||||
--- ffmpeg-5.0.orig/libavformat/matroskaenc.c 2022-01-14 19:45:40.000000000 +0100
|
||||
+++ ffmpeg-5.0/libavformat/matroskaenc.c 2022-02-04 08:29:14.582130919 +0100
|
||||
@@ -2887,16 +2887,24 @@ static int mkv_query_codec(enum AVCodecI
|
||||
--- ffmpeg-7.0.orig/libavformat/matroskaenc.c
|
||||
+++ ffmpeg-7.0/libavformat/matroskaenc.c
|
||||
@@ -3540,16 +3540,25 @@ static int mkv_query_codec(enum AVCodecI
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+#define PREFAUDIO \
|
||||
+ CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : \
|
||||
+ CONFIG_AAC_ENCODER ? AV_CODEC_ID_AAC : \
|
||||
+ CONFIG_VORBIS_ENCODER ? AV_CODEC_ID_VORBIS : \
|
||||
+ AV_CODEC_ID_AC3
|
||||
const AVOutputFormat ff_matroska_muxer = {
|
||||
.name = "matroska",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Matroska"),
|
||||
.mime_type = "video/x-matroska",
|
||||
.extensions = "mkv",
|
||||
+
|
||||
const FFOutputFormat ff_matroska_muxer = {
|
||||
.p.name = "matroska",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("Matroska"),
|
||||
.p.mime_type = "video/x-matroska",
|
||||
.p.extensions = "mkv",
|
||||
.priv_data_size = sizeof(MatroskaMuxContext),
|
||||
- .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
|
||||
- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
|
||||
- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
|
||||
- .video_codec = CONFIG_LIBX264_ENCODER ?
|
||||
- .p.video_codec = CONFIG_LIBX264_ENCODER ?
|
||||
- AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
|
||||
+ .audio_codec = PREFAUDIO,
|
||||
+ .video_codec =
|
||||
+ CONFIG_LIBVPX_VP9_ENCODER ? AV_CODEC_ID_VP9 : \
|
||||
+ CONFIG_LIBX264_ENCODER ? AV_CODEC_ID_H264 : \
|
||||
+ CONFIG_LIBVPX_VP8_ENCODER ? AV_CODEC_ID_VP8 : \
|
||||
+ CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \
|
||||
+ AV_CODEC_ID_THEORA,
|
||||
+ .p.audio_codec = PREFAUDIO,
|
||||
+ .p.video_codec =
|
||||
+ CONFIG_LIBVPX_VP9_ENCODER ? AV_CODEC_ID_VP9 : \
|
||||
+ CONFIG_LIBX264_ENCODER ? AV_CODEC_ID_H264 : \
|
||||
+ CONFIG_LIBVPX_VP8_ENCODER ? AV_CODEC_ID_VP8 : \
|
||||
+ CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \
|
||||
+ AV_CODEC_ID_THEORA,
|
||||
.init = mkv_init,
|
||||
.deinit = mkv_deinit,
|
||||
.write_header = mkv_write_header,
|
||||
@@ -2954,8 +2962,7 @@ const AVOutputFormat ff_matroska_audio_m
|
||||
.mime_type = "audio/x-matroska",
|
||||
.extensions = "mka",
|
||||
@@ -3617,8 +3626,7 @@ const FFOutputFormat ff_matroska_audio_m
|
||||
.p.mime_type = "audio/x-matroska",
|
||||
.p.extensions = "mka",
|
||||
.priv_data_size = sizeof(MatroskaMuxContext),
|
||||
- .audio_codec = CONFIG_LIBVORBIS_ENCODER ?
|
||||
- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
|
||||
- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
|
||||
+ .audio_codec = PREFAUDIO,
|
||||
.video_codec = AV_CODEC_ID_NONE,
|
||||
+ .p.audio_codec = PREFAUDIO,
|
||||
.p.video_codec = AV_CODEC_ID_NONE,
|
||||
.init = mkv_init,
|
||||
.deinit = mkv_deinit,
|
||||
|
||||
|
|
|
|||
|
|
@ -1,363 +0,0 @@
|
|||
From 1f48740db0dda8d6ec1b97a7f4a794e381a65636 Mon Sep 17 00:00:00 2001
|
||||
From: Neal Gompa <ngompa@fedoraproject.org>
|
||||
Date: Wed, 12 Oct 2022 09:41:27 -0400
|
||||
Subject: [PATCH] avcodec/openh264: Add the ability to dlopen() OpenH264
|
||||
|
||||
We can't directly depend on OpenH264, but we can weakly link to it
|
||||
and gracefully expose the capability.
|
||||
|
||||
Co-authored-by: Andreas Schneider <asn@cryptomilk.org>
|
||||
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 | 5 ++
|
||||
libavcodec/libopenh264_dlopen.c | 147 ++++++++++++++++++++++++++++++++
|
||||
libavcodec/libopenh264_dlopen.h | 58 +++++++++++++
|
||||
libavcodec/libopenh264dec.c | 10 +++
|
||||
libavcodec/libopenh264enc.c | 10 +++
|
||||
7 files changed, 234 insertions(+)
|
||||
create mode 100644 libavcodec/libopenh264_dlopen.c
|
||||
create mode 100644 libavcodec/libopenh264_dlopen.h
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ba5793b2ff..8855c1a908 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -251,6 +251,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]
|
||||
+ --enable-libopenh264-dlopen enable H.264 encoding via dlopen()'ed OpenH264 [no]
|
||||
--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
|
||||
@@ -1844,6 +1845,7 @@ EXTERNAL_LIBRARY_LIST="
|
||||
libmysofa
|
||||
libopencv
|
||||
libopenh264
|
||||
+ libopenh264_dlopen
|
||||
libopenjpeg
|
||||
libopenmpt
|
||||
libopenvino
|
||||
@@ -6596,6 +6598,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h &&
|
||||
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
|
||||
+enabled libopenh264_dlopen && enable libopenh264 && add_cppflags "-I$(dirname `readlink -f $0`)/ffdlopenhdrs/include -DCONFIG_LIBOPENH264_DLOPEN=1"
|
||||
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 457ec58377..08a26fba5f 100644
|
||||
--- a/libavcodec/Makefile
|
||||
+++ b/libavcodec/Makefile
|
||||
@@ -1075,6 +1075,7 @@ OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o
|
||||
OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o
|
||||
+OBJS-$(CONFIG_LIBOPENH264_DLOPEN) += libopenh264_dlopen.o
|
||||
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 c80c85ea8b..128c3d9846 100644
|
||||
--- a/libavcodec/libopenh264.c
|
||||
+++ b/libavcodec/libopenh264.c
|
||||
@@ -20,8 +20,13 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
+
|
||||
+#ifdef CONFIG_LIBOPENH264_DLOPEN
|
||||
+#include "libopenh264_dlopen.h"
|
||||
+#else
|
||||
#include <wels/codec_api.h>
|
||||
#include <wels/codec_ver.h>
|
||||
+#endif
|
||||
|
||||
#include "libavutil/error.h"
|
||||
#include "libavutil/log.h"
|
||||
diff --git a/libavcodec/libopenh264_dlopen.c b/libavcodec/libopenh264_dlopen.c
|
||||
new file mode 100644
|
||||
index 0000000000..49ea8ff44f
|
||||
--- /dev/null
|
||||
+++ b/libavcodec/libopenh264_dlopen.c
|
||||
@@ -0,0 +1,147 @@
|
||||
+/*
|
||||
+ * OpenH264 dlopen code
|
||||
+ *
|
||||
+ * Copyright (C) 2022 Andreas Schneider <asn@cryptomilk.org>
|
||||
+ *
|
||||
+ * This file is part of FFmpeg.
|
||||
+ *
|
||||
+ * FFmpeg is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * FFmpeg is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with FFmpeg; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ */
|
||||
+
|
||||
+#include <dlfcn.h>
|
||||
+
|
||||
+#include "libopenh264_dlopen.h"
|
||||
+
|
||||
+/*
|
||||
+ * The symbol binding makes sure we do not run into strict aliasing issues which
|
||||
+ * can lead into segfaults.
|
||||
+ */
|
||||
+typedef int (*__oh264_WelsCreateSVCEncoder)(ISVCEncoder **);
|
||||
+typedef void (*__oh264_WelsDestroySVCEncoder)(ISVCEncoder *);
|
||||
+typedef int (*__oh264_WelsGetDecoderCapability)(SDecoderCapability *);
|
||||
+typedef long (*__oh264_WelsCreateDecoder)(ISVCDecoder **);
|
||||
+typedef void (*__oh264_WelsDestroyDecoder)(ISVCDecoder *);
|
||||
+typedef OpenH264Version (*__oh264_WelsGetCodecVersion)(void);
|
||||
+typedef void (*__oh264_WelsGetCodecVersionEx)(OpenH264Version *);
|
||||
+
|
||||
+#define OH264_SYMBOL_ENTRY(i) \
|
||||
+ union { \
|
||||
+ __oh264_##i f; \
|
||||
+ void *obj; \
|
||||
+ } _oh264_##i
|
||||
+
|
||||
+struct oh264_symbols {
|
||||
+ OH264_SYMBOL_ENTRY(WelsCreateSVCEncoder);
|
||||
+ OH264_SYMBOL_ENTRY(WelsDestroySVCEncoder);
|
||||
+ OH264_SYMBOL_ENTRY(WelsGetDecoderCapability);
|
||||
+ OH264_SYMBOL_ENTRY(WelsCreateDecoder);
|
||||
+ OH264_SYMBOL_ENTRY(WelsDestroyDecoder);
|
||||
+ OH264_SYMBOL_ENTRY(WelsGetCodecVersion);
|
||||
+ OH264_SYMBOL_ENTRY(WelsGetCodecVersionEx);
|
||||
+};
|
||||
+
|
||||
+/* Symbols are bound by loadLibOpenH264() */
|
||||
+static struct oh264_symbols openh264_symbols;
|
||||
+
|
||||
+int oh264_WelsCreateSVCEncoder(ISVCEncoder **ppEncoder) {
|
||||
+ return openh264_symbols._oh264_WelsCreateSVCEncoder.f(ppEncoder);
|
||||
+}
|
||||
+
|
||||
+void oh264_WelsDestroySVCEncoder(ISVCEncoder *pEncoder) {
|
||||
+ return openh264_symbols._oh264_WelsDestroySVCEncoder.f(pEncoder);
|
||||
+}
|
||||
+
|
||||
+int oh264_WelsGetDecoderCapability(SDecoderCapability *pDecCapability) {
|
||||
+ return openh264_symbols._oh264_WelsGetDecoderCapability.f(pDecCapability);
|
||||
+}
|
||||
+
|
||||
+long oh264_WelsCreateDecoder(ISVCDecoder **ppDecoder) {
|
||||
+ return openh264_symbols._oh264_WelsCreateDecoder.f(ppDecoder);
|
||||
+}
|
||||
+
|
||||
+void oh264_WelsDestroyDecoder(ISVCDecoder *pDecoder) {
|
||||
+ return openh264_symbols._oh264_WelsDestroyDecoder.f(pDecoder);
|
||||
+}
|
||||
+
|
||||
+OpenH264Version oh264_WelsGetCodecVersion(void) {
|
||||
+ return openh264_symbols._oh264_WelsGetCodecVersion.f();
|
||||
+}
|
||||
+
|
||||
+void oh264_WelsGetCodecVersionEx(OpenH264Version *pVersion) {
|
||||
+ openh264_symbols._oh264_WelsGetCodecVersionEx.f(pVersion);
|
||||
+}
|
||||
+
|
||||
+static void *_oh264_bind_symbol(AVCodecContext *avctx,
|
||||
+ void *handle,
|
||||
+ const char *sym_name) {
|
||||
+ void *sym = NULL;
|
||||
+
|
||||
+ sym = dlsym(handle, sym_name);
|
||||
+ if (sym == NULL) {
|
||||
+ const char *err = dlerror();
|
||||
+ av_log(avctx,
|
||||
+ AV_LOG_WARNING,
|
||||
+ "%s: Failed to bind %s\n",
|
||||
+ err,
|
||||
+ sym_name);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return sym;
|
||||
+}
|
||||
+
|
||||
+#define oh264_bind_symbol(avctx, handle, sym_name) \
|
||||
+ if (openh264_symbols._oh264_##sym_name.obj == NULL) { \
|
||||
+ openh264_symbols._oh264_##sym_name.obj = _oh264_bind_symbol(avctx, handle, #sym_name); \
|
||||
+ if (openh264_symbols._oh264_##sym_name.obj == NULL) { \
|
||||
+ return 1; \
|
||||
+ } \
|
||||
+ }
|
||||
+
|
||||
+int loadLibOpenH264(AVCodecContext *avctx) {
|
||||
+ static bool initialized = false;
|
||||
+ void *libopenh264 = NULL;
|
||||
+ const char *err = NULL;
|
||||
+
|
||||
+ if (initialized) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+#define OPENH264_LIB "libopenh264.so.7"
|
||||
+ libopenh264 = dlopen(OPENH264_LIB, RTLD_LAZY);
|
||||
+ err = dlerror();
|
||||
+ if (err != NULL) {
|
||||
+ av_log(avctx, AV_LOG_WARNING,
|
||||
+ "%s: %s is missing, openh264 support will be disabled\n", err,
|
||||
+ OPENH264_LIB);
|
||||
+
|
||||
+ if (libopenh264 != NULL) {
|
||||
+ dlclose(libopenh264);
|
||||
+ }
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ oh264_bind_symbol(avctx, libopenh264, WelsCreateSVCEncoder);
|
||||
+ oh264_bind_symbol(avctx, libopenh264, WelsDestroySVCEncoder);
|
||||
+ oh264_bind_symbol(avctx, libopenh264, WelsGetDecoderCapability);
|
||||
+ oh264_bind_symbol(avctx, libopenh264, WelsCreateDecoder);
|
||||
+ oh264_bind_symbol(avctx, libopenh264, WelsDestroyDecoder);
|
||||
+ oh264_bind_symbol(avctx, libopenh264, WelsGetCodecVersion);
|
||||
+ oh264_bind_symbol(avctx, libopenh264, WelsGetCodecVersionEx);
|
||||
+
|
||||
+ initialized = true;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/libavcodec/libopenh264_dlopen.h b/libavcodec/libopenh264_dlopen.h
|
||||
new file mode 100644
|
||||
index 0000000000..d7d8bb7cad
|
||||
--- /dev/null
|
||||
+++ b/libavcodec/libopenh264_dlopen.h
|
||||
@@ -0,0 +1,58 @@
|
||||
+/*
|
||||
+ * OpenH264 dlopen code
|
||||
+ *
|
||||
+ * Copyright (C) 2022 Andreas Schneider <asn@cryptomilk.org>
|
||||
+ *
|
||||
+ * This file is part of FFmpeg.
|
||||
+ *
|
||||
+ * FFmpeg is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * FFmpeg is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with FFmpeg; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ */
|
||||
+
|
||||
+#ifndef HAVE_LIBOPENH264_DLOPEN_H
|
||||
+#define HAVE_LIBOPENH264_DLOPEN_H
|
||||
+
|
||||
+#ifdef CONFIG_LIBOPENH264_DLOPEN
|
||||
+
|
||||
+#include <wels/codec_api.h>
|
||||
+#include <wels/codec_ver.h>
|
||||
+
|
||||
+#include "avcodec.h"
|
||||
+
|
||||
+int oh264_WelsCreateSVCEncoder(ISVCEncoder **ppEncoder);
|
||||
+#define WelsCreateSVCEncoder oh264_WelsCreateSVCEncoder
|
||||
+
|
||||
+void oh264_WelsDestroySVCEncoder(ISVCEncoder *pEncoder);
|
||||
+#define WelsDestroySVCEncoder oh264_WelsDestroySVCEncoder
|
||||
+
|
||||
+int oh264_WelsGetDecoderCapability(SDecoderCapability *pDecCapability);
|
||||
+#define WelsGetDecoderCapability oh264_WelsGetDecoderCapability
|
||||
+
|
||||
+long oh264_WelsCreateDecoder(ISVCDecoder **ppDecoder);
|
||||
+#define WelsCreateDecoder oh264_WelsCreateDecoder
|
||||
+
|
||||
+void oh264_WelsDestroyDecoder(ISVCDecoder *pDecoder);
|
||||
+#define WelsDestroyDecoder oh264_WelsDestroyDecoder
|
||||
+
|
||||
+OpenH264Version oh264_WelsGetCodecVersion(void);
|
||||
+#define WelsGetCodecVersion oh264_WelsGetCodecVersion
|
||||
+
|
||||
+void oh264_WelsGetCodecVersionEx(OpenH264Version *pVersion);
|
||||
+#define WelsGetCodecVersionEx oh264_WelsGetCodecVersionEx
|
||||
+
|
||||
+int loadLibOpenH264(AVCodecContext *avctx);
|
||||
+
|
||||
+#endif /* CONFIG_LIBOPENH264_DLOPEN */
|
||||
+
|
||||
+#endif /* HAVE_LIBOPENH264_DLOPEN_H */
|
||||
diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
|
||||
index 7e14d4dd7d..a805598446 100644
|
||||
--- a/libavcodec/libopenh264dec.c
|
||||
+++ b/libavcodec/libopenh264dec.c
|
||||
@@ -19,8 +19,12 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
+#ifdef CONFIG_LIBOPENH264_DLOPEN
|
||||
+#include "libopenh264_dlopen.h"
|
||||
+#else
|
||||
#include <wels/codec_api.h>
|
||||
#include <wels/codec_ver.h>
|
||||
+#endif
|
||||
|
||||
#include "libavutil/common.h"
|
||||
#include "libavutil/fifo.h"
|
||||
@@ -55,6 +59,12 @@ static av_cold int svc_decode_init(AVCodecContext *avctx)
|
||||
int log_level;
|
||||
WelsTraceCallback callback_function;
|
||||
|
||||
+#ifdef CONFIG_LIBOPENH264_DLOPEN
|
||||
+ if (loadLibOpenH264(avctx)) {
|
||||
+ return AVERROR_DECODER_NOT_FOUND;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (WelsCreateDecoder(&s->decoder)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n");
|
||||
return AVERROR_UNKNOWN;
|
||||
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
|
||||
index 5257906567..80481f3d0a 100644
|
||||
--- a/libavcodec/libopenh264enc.c
|
||||
+++ b/libavcodec/libopenh264enc.c
|
||||
@@ -19,8 +19,12 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
+#ifdef CONFIG_LIBOPENH264_DLOPEN
|
||||
+#include "libopenh264_dlopen.h"
|
||||
+#else
|
||||
#include <wels/codec_api.h>
|
||||
#include <wels/codec_ver.h>
|
||||
+#endif
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/common.h"
|
||||
@@ -114,6 +118,12 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
|
||||
WelsTraceCallback callback_function;
|
||||
AVCPBProperties *props;
|
||||
|
||||
+#ifdef CONFIG_LIBOPENH264_DLOPEN
|
||||
+ if (loadLibOpenH264(avctx)) {
|
||||
+ return AVERROR_ENCODER_NOT_FOUND;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (WelsCreateSVCEncoder(&s->encoder)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unable to create encoder\n");
|
||||
return AVERROR_UNKNOWN;
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2016-04-10 23:23:53.138440254 +0200
|
||||
|
||||
Improve the error messages a bit to say what's really going on
|
||||
(in light of a reduced build).
|
||||
|
||||
---
|
||||
fftools/ffmpeg.c | 2 +-
|
||||
fftools/ffmpeg_filter.c | 4 ++--
|
||||
fftools/ffmpeg_opt.c | 2 +-
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: ffmpeg-5.0/fftools/ffmpeg.c
|
||||
===================================================================
|
||||
--- ffmpeg-5.0.orig/fftools/ffmpeg.c 2022-01-14 19:45:39.000000000 +0100
|
||||
+++ ffmpeg-5.0/fftools/ffmpeg.c 2022-02-04 08:16:14.606621540 +0100
|
||||
@@ -2871,7 +2871,7 @@ static int init_input_stream(int ist_ind
|
||||
if (ist->decoding_needed) {
|
||||
const AVCodec *codec = ist->dec;
|
||||
if (!codec) {
|
||||
- snprintf(error, error_len, "Decoder (codec %s) not found for input stream #%d:%d",
|
||||
+ snprintf(error, error_len, "This build of ffmpeg does not include a \"%s\" decoder needed for input stream #%d:%d.",
|
||||
avcodec_get_name(ist->dec_ctx->codec_id), ist->file_index, ist->st->index);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
Index: ffmpeg-5.0/fftools/ffmpeg_filter.c
|
||||
===================================================================
|
||||
--- ffmpeg-5.0.orig/fftools/ffmpeg_filter.c 2022-01-14 19:45:39.000000000 +0100
|
||||
+++ ffmpeg-5.0/fftools/ffmpeg_filter.c 2022-02-04 08:16:14.607621538 +0100
|
||||
@@ -925,7 +925,7 @@ static int configure_input_filter(Filter
|
||||
{
|
||||
if (!ifilter->ist->dec) {
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
- "No decoder for stream #%d:%d, filtering impossible\n",
|
||||
+ "This build of ffmpeg does not have a suitable decoder for stream #%d:%d enabled, filtering impossible\n",
|
||||
ifilter->ist->file_index, ifilter->ist->st->index);
|
||||
return AVERROR_DECODER_NOT_FOUND;
|
||||
}
|
||||
@@ -1094,7 +1094,7 @@ int configure_filtergraph(FilterGraph *f
|
||||
if (!ost->enc) {
|
||||
/* identical to the same check in ffmpeg.c, needed because
|
||||
complex filter graphs are initialized earlier */
|
||||
- av_log(NULL, AV_LOG_ERROR, "Encoder (codec %s) not found for output stream #%d:%d\n",
|
||||
+ av_log(NULL, AV_LOG_ERROR, "This build of ffmpeg does not include a \"%s\" encoder needed for output stream #%d:%d.\n",
|
||||
avcodec_get_name(ost->st->codecpar->codec_id), ost->file_index, ost->index);
|
||||
ret = AVERROR(EINVAL);
|
||||
goto fail;
|
||||
Index: ffmpeg-5.0/fftools/ffmpeg_opt.c
|
||||
===================================================================
|
||||
--- ffmpeg-5.0.orig/fftools/ffmpeg_opt.c 2022-01-14 19:45:39.000000000 +0100
|
||||
+++ ffmpeg-5.0/fftools/ffmpeg_opt.c 2022-02-04 08:16:14.607621538 +0100
|
||||
@@ -1406,7 +1406,7 @@ static int choose_encoder(OptionsContext
|
||||
if (!ost->enc) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Automatic encoder selection failed for "
|
||||
"output stream #%d:%d. Default encoder for format %s (codec %s) is "
|
||||
- "probably disabled. Please choose an encoder manually.\n",
|
||||
+ "probably disabled or this build of ffmpeg does not include that codec. Please choose an encoder manually.\n",
|
||||
ost->file_index, ost->index, s->oformat->name,
|
||||
avcodec_get_name(ost->st->codecpar->codec_id));
|
||||
return AVERROR_ENCODER_NOT_FOUND;
|
||||
500
ffmpeg.spec
500
ffmpeg.spec
|
|
@ -1,9 +1,9 @@
|
|||
# For a complete build enable these two
|
||||
%bcond_with upstream_tarball
|
||||
%bcond_with all_codecs
|
||||
%bcond upstream_tarball 0
|
||||
%bcond all_codecs 0
|
||||
|
||||
# Break dependency cycles by disabling certain optional dependencies.
|
||||
%bcond_with bootstrap
|
||||
%bcond bootstrap 0
|
||||
|
||||
# If you want to do a build with the upstream source tarball, then set the
|
||||
# pkg_suffix to %%nil. We can't handle this with a conditional, as srpm
|
||||
|
|
@ -12,128 +12,103 @@
|
|||
|
||||
# Fails due to asm issue
|
||||
%ifarch %{ix86} %{arm}
|
||||
%bcond_with lto
|
||||
%bcond lto 0
|
||||
%else
|
||||
%bcond_without lto
|
||||
%bcond lto 1
|
||||
%endif
|
||||
|
||||
%ifarch x86_64
|
||||
%bcond_without svtav1
|
||||
%bcond_without mfx
|
||||
%bcond_without vmaf
|
||||
%bcond vpl 1
|
||||
%bcond vmaf 1
|
||||
%else
|
||||
%bcond_with svtav1
|
||||
%bcond_with mfx
|
||||
%bcond_with vmaf
|
||||
%bcond vpl 0
|
||||
%bcond vmaf 0
|
||||
%endif
|
||||
|
||||
%ifarch s390 s390x
|
||||
%bcond_with dc1394
|
||||
%bcond dc1394 0
|
||||
%bcond ffnvcodec 0
|
||||
%else
|
||||
%bcond_without dc1394
|
||||
%bcond dc1394 1
|
||||
%bcond ffnvcodec 1
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
# Disable dependencies not offered in RHEL/EPEL
|
||||
%bcond_with crystalhd
|
||||
%bcond_with omxil
|
||||
# Disable dependencies not available or wanted on RHEL/EPEL
|
||||
%bcond chromaprint 0
|
||||
%bcond flite 0
|
||||
%bcond lc3 0
|
||||
%else
|
||||
|
||||
# Disable some features because RHEL 9 packages are too old
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 9
|
||||
%bcond_with flite
|
||||
%bcond_with lcms2
|
||||
%bcond_with placebo
|
||||
%else
|
||||
%bcond_without flite
|
||||
%bcond_without lcms2
|
||||
%bcond_without placebo
|
||||
%endif
|
||||
|
||||
# crystalhd isn't available on IBM Z
|
||||
%ifarch s390 s390x
|
||||
%bcond_with crystalhd
|
||||
%else
|
||||
%bcond_without crystalhd
|
||||
%endif
|
||||
|
||||
%bcond_without omxil
|
||||
|
||||
%endif
|
||||
|
||||
# Break chromaprint dependency cycle (Fedora-only):
|
||||
# ffmpeg (libavcodec-free) → chromaprint → ffmpeg
|
||||
%if %{with bootstrap}
|
||||
%bcond_with chromaprint
|
||||
%else
|
||||
%bcond_without chromaprint
|
||||
%bcond chromaprint %{?_with_bootstrap:0}%{!?_with_bootstrap:1}
|
||||
%bcond flite 1
|
||||
%bcond lc3 1
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 9
|
||||
# Disable some features because RHEL 9 packages are too old
|
||||
%bcond lcms2 0
|
||||
%bcond placebo 0
|
||||
%else
|
||||
%bcond lcms2 1
|
||||
%bcond placebo 1
|
||||
%endif
|
||||
|
||||
%if %{with all_codecs}
|
||||
%bcond_without rtmp
|
||||
%bcond_without x264
|
||||
%bcond_without x265
|
||||
%bcond evc 1
|
||||
%bcond rtmp 1
|
||||
%bcond vvc 1
|
||||
%bcond x264 1
|
||||
%bcond x265 1
|
||||
%else
|
||||
%bcond_with rtmp
|
||||
%bcond_with x264
|
||||
%bcond_with x265
|
||||
%bcond evc 0
|
||||
%bcond rtmp 0
|
||||
%bcond vvc 0
|
||||
%bcond x264 0
|
||||
%bcond x265 0
|
||||
%endif
|
||||
|
||||
%if %{without lto}
|
||||
%global _lto_cflags %{nil}
|
||||
%endif
|
||||
|
||||
%if "%{__isa_bits}" == "64"
|
||||
%global lib64_suffix ()(64bit)
|
||||
%endif
|
||||
%global openh264_soversion 7
|
||||
# FIXME: GCC says there's incompatible pointer casts going on in libavdevice...
|
||||
%global build_type_safety_c 2
|
||||
|
||||
%global av_codec_soversion 59
|
||||
%global av_device_soversion 59
|
||||
%global av_filter_soversion 8
|
||||
%global av_format_soversion 59
|
||||
%global av_util_soversion 57
|
||||
%global postproc_soversion 56
|
||||
%global swresample_soversion 4
|
||||
%global swscale_soversion 6
|
||||
%global av_codec_soversion 61
|
||||
%global av_device_soversion 61
|
||||
%global av_filter_soversion 10
|
||||
%global av_format_soversion 61
|
||||
%global av_util_soversion 59
|
||||
%global postproc_soversion 58
|
||||
%global swresample_soversion 5
|
||||
%global swscale_soversion 8
|
||||
|
||||
Name: ffmpeg
|
||||
%global pkg_name %{name}%{?pkg_suffix}
|
||||
|
||||
Version: 5.1.4
|
||||
Release: 3%{?dist}
|
||||
Version: 7.1.2
|
||||
Release: 1%{?dist}
|
||||
Summary: A complete solution to record, convert and stream audio and video
|
||||
License: GPLv3+
|
||||
License: GPL-3.0-or-later
|
||||
URL: https://ffmpeg.org/
|
||||
Source0: ffmpeg%{?pkg_suffix}-%{version}.tar.xz
|
||||
Source1: ffmpeg-dlopen-headers.tar.xz
|
||||
Source2: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz.asc
|
||||
Source0: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz
|
||||
Source1: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz.asc
|
||||
# https://ffmpeg.org/ffmpeg-devel.asc
|
||||
# gpg2 --import --import-options import-export,import-minimal ffmpeg-devel.asc > ./ffmpeg.keyring
|
||||
Source3: ffmpeg.keyring
|
||||
Source4: ffmpeg_free_sources
|
||||
Source2: ffmpeg.keyring
|
||||
Source20: enable_decoders
|
||||
Source21: enable_encoders
|
||||
# Scripts for generating tarballs
|
||||
Source90: ffmpeg_update_free_sources.sh
|
||||
Source91: ffmpeg_gen_free_tarball.sh
|
||||
Source92: ffmpeg_get_dlopen_headers.sh
|
||||
Source93: ffmpeg_find_free_source_headers.sh
|
||||
|
||||
# Fixes for reduced codec selection on free build
|
||||
Patch1: ffmpeg-codec-choice.patch
|
||||
# Better error messages for free build
|
||||
Patch2: ffmpeg-new-coder-errors.patch
|
||||
# Allow to build with fdk-aac-free
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112
|
||||
Patch3: ffmpeg-allow-fdk-aac-free.patch
|
||||
# Drop openh264 runtime version checks
|
||||
# https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=10211
|
||||
Patch4: 0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch
|
||||
Patch2: ffmpeg-allow-fdk-aac-free.patch
|
||||
|
||||
# Set up dlopen for openh264
|
||||
Patch1001: ffmpeg-dlopen-openh264.patch
|
||||
# Backport fix for CVE-2025-22921
|
||||
Patch10: https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/7f9c7f9849a2155224711f0ff57ecdac6e4bfb57#/ffmpeg-CVE-2025-22921.patch
|
||||
|
||||
# Add first_dts getter to libavformat for Chromium
|
||||
# See: https://bugzilla.redhat.com/show_bug.cgi?id=2240127
|
||||
|
|
@ -162,10 +137,8 @@ BuildRequires: gnupg2
|
|||
BuildRequires: gsm-devel
|
||||
BuildRequires: ladspa-devel
|
||||
BuildRequires: lame-devel
|
||||
%if %{with crystalhd}
|
||||
BuildRequires: libcrystalhd-devel
|
||||
%endif
|
||||
BuildRequires: libgcrypt-devel
|
||||
BuildRequires: libklvanc-devel
|
||||
BuildRequires: libmysofa-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXext-devel
|
||||
|
|
@ -175,10 +148,13 @@ BuildRequires: nasm
|
|||
BuildRequires: perl(Pod::Man)
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: pkgconfig(aom)
|
||||
BuildRequires: pkgconfig(aribb24) >= 1.0.3
|
||||
BuildRequires: pkgconfig(bzip2)
|
||||
BuildRequires: pkgconfig(caca)
|
||||
BuildRequires: pkgconfig(codec2)
|
||||
BuildRequires: pkgconfig(dav1d)
|
||||
BuildRequires: pkgconfig(dvdnav)
|
||||
BuildRequires: pkgconfig(dvdread)
|
||||
BuildRequires: pkgconfig(ffnvcodec)
|
||||
BuildRequires: pkgconfig(flac)
|
||||
BuildRequires: pkgconfig(fontconfig)
|
||||
|
|
@ -187,11 +163,16 @@ BuildRequires: pkgconfig(frei0r)
|
|||
BuildRequires: pkgconfig(fribidi)
|
||||
BuildRequires: pkgconfig(gl)
|
||||
BuildRequires: pkgconfig(gnutls)
|
||||
BuildRequires: pkgconfig(harfbuzz)
|
||||
BuildRequires: pkgconfig(libilbc)
|
||||
BuildRequires: pkgconfig(jack)
|
||||
%if %{with lc3}
|
||||
BuildRequires: pkgconfig(lc3) >= 1.1.0
|
||||
%endif
|
||||
%if %{with lcms2}
|
||||
BuildRequires: pkgconfig(lcms2) >= 2.13
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libaribcaption) >= 1.1.1
|
||||
BuildRequires: pkgconfig(libass)
|
||||
BuildRequires: pkgconfig(libbluray)
|
||||
BuildRequires: pkgconfig(libbs2b)
|
||||
|
|
@ -203,15 +184,13 @@ BuildRequires: pkgconfig(libchromaprint)
|
|||
BuildRequires: pkgconfig(libdrm)
|
||||
BuildRequires: pkgconfig(libjxl) >= 0.7.0
|
||||
BuildRequires: pkgconfig(libmodplug)
|
||||
%if %{with omxil}
|
||||
BuildRequires: pkgconfig(libomxil-bellagio)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libopenjp2)
|
||||
BuildRequires: pkgconfig(libopenmpt)
|
||||
%if %{with placebo}
|
||||
BuildRequires: pkgconfig(libplacebo) >= 4.192.0
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: pkgconfig(libqrencode)
|
||||
BuildRequires: pkgconfig(librabbitmq)
|
||||
BuildRequires: pkgconfig(librist)
|
||||
BuildRequires: pkgconfig(librsvg-2.0)
|
||||
|
|
@ -225,15 +204,14 @@ BuildRequires: pkgconfig(libxml-2.0)
|
|||
BuildRequires: pkgconfig(libzmq)
|
||||
BuildRequires: pkgconfig(lilv-0)
|
||||
BuildRequires: pkgconfig(lv2)
|
||||
BuildRequires: pkgconfig(netcdf)
|
||||
BuildRequires: pkgconfig(ogg)
|
||||
BuildRequires: pkgconfig(openal)
|
||||
BuildRequires: pkgconfig(opencore-amrnb)
|
||||
BuildRequires: pkgconfig(OpenCL)
|
||||
BuildRequires: pkgconfig(openh264)
|
||||
BuildRequires: pkgconfig(opus)
|
||||
BuildRequires: pkgconfig(rav1e)
|
||||
BuildRequires: pkgconfig(rubberband)
|
||||
BuildRequires: pkgconfig(schroedinger-1.0)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(shaderc) >= 2019.1
|
||||
BuildRequires: pkgconfig(smbclient)
|
||||
|
|
@ -241,6 +219,7 @@ BuildRequires: pkgconfig(snappy)
|
|||
BuildRequires: pkgconfig(soxr)
|
||||
BuildRequires: pkgconfig(speex)
|
||||
BuildRequires: pkgconfig(srt)
|
||||
BuildRequires: pkgconfig(SvtAv1Enc) >= 0.9.0
|
||||
BuildRequires: pkgconfig(tesseract)
|
||||
BuildRequires: pkgconfig(theora)
|
||||
BuildRequires: pkgconfig(twolame)
|
||||
|
|
@ -250,7 +229,7 @@ BuildRequires: pkgconfig(vidstab)
|
|||
BuildRequires: pkgconfig(vorbis)
|
||||
BuildRequires: pkgconfig(vo-amrwbenc)
|
||||
BuildRequires: pkgconfig(vpx)
|
||||
BuildRequires: pkgconfig(vulkan)
|
||||
BuildRequires: pkgconfig(vulkan) >= 1.3.255
|
||||
BuildRequires: pkgconfig(wavpack)
|
||||
BuildRequires: pkgconfig(xcb)
|
||||
BuildRequires: pkgconfig(xcb-render)
|
||||
|
|
@ -271,11 +250,12 @@ BuildRequires: pkgconfig(libiec61883)
|
|||
%if %{with rtmp}
|
||||
BuildRequires: librtmp-devel
|
||||
%endif
|
||||
%if %{with mfx}
|
||||
BuildRequires: pkgconfig(libmfx) < 2.0
|
||||
%if %{with vpl}
|
||||
BuildRequires: pkgconfig(vpl) >= 2.6
|
||||
%endif
|
||||
%if %{with svtav1}
|
||||
BuildRequires: pkgconfig(SvtAv1Enc) >= 0.9.0
|
||||
%if %{with evc}
|
||||
BuildRequires: pkgconfig(libxevd)
|
||||
BuildRequires: pkgconfig(libxeve)
|
||||
%endif
|
||||
%if %{with x264}
|
||||
BuildRequires: pkgconfig(x264)
|
||||
|
|
@ -349,10 +329,8 @@ community or a corporation.
|
|||
Summary: FFmpeg codec library
|
||||
Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release}
|
||||
Requires: libswresample%{?pkg_suffix}%{_isa} = %{version}-%{release}
|
||||
# We dlopen() openh264, so weak-depend on it...
|
||||
## Note, we can do this because openh264 is provided in a default-enabled
|
||||
## third party repository provided by Cisco.
|
||||
Recommends: libopenh264.so.%{openh264_soversion}%{?lib64_suffix}
|
||||
# We require libopenh264 library, which has a dummy implementation and a real one
|
||||
# In the event that this is being installed, we want to prefer openh264 if available
|
||||
Suggests: openh264%{_isa}
|
||||
|
||||
%description -n libavcodec%{?pkg_suffix}
|
||||
|
|
@ -560,10 +538,10 @@ This subpackage contains the headers for FFmpeg libswscale.
|
|||
|
||||
%prep
|
||||
%if %{with upstream_tarball}
|
||||
gpgv2 --quiet --keyring %{SOURCE3} %{SOURCE2} %{SOURCE0}
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||
%endif
|
||||
|
||||
%autosetup -a1 -S git_am
|
||||
%autosetup -S git_am
|
||||
install -m 0644 %{SOURCE20} enable_decoders
|
||||
install -m 0644 %{SOURCE21} enable_encoders
|
||||
# fix -O3 -g in host_cflags
|
||||
|
|
@ -587,31 +565,42 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
|
|||
--optflags="%{build_cflags}" \
|
||||
--extra-ldflags="%{build_ldflags}" \
|
||||
--disable-htmlpages \
|
||||
--enable-pic \
|
||||
--disable-stripping \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--disable-stripping \
|
||||
--enable-pic \
|
||||
--enable-shared \
|
||||
--enable-gpl \
|
||||
--enable-version3 \
|
||||
--enable-libsmbclient \
|
||||
--disable-openssl \
|
||||
--enable-amf \
|
||||
--enable-avcodec \
|
||||
--enable-avdevice \
|
||||
--enable-avfilter \
|
||||
--enable-avformat \
|
||||
--enable-alsa \
|
||||
--enable-bzlib \
|
||||
--enable-frei0r \
|
||||
%if %{with chromaprint}
|
||||
--enable-chromaprint \
|
||||
%else
|
||||
--disable-chromaprint \
|
||||
%endif
|
||||
--disable-cuda-nvcc \
|
||||
%if %{with ffnvcodec}
|
||||
--enable-cuvid \
|
||||
%endif
|
||||
--disable-decklink \
|
||||
--enable-frei0r \
|
||||
--enable-gcrypt \
|
||||
--enable-gmp \
|
||||
--enable-gnutls \
|
||||
--enable-gray \
|
||||
--enable-iconv \
|
||||
--enable-ladspa \
|
||||
%if %{with lcms2}
|
||||
--enable-lcms2 \
|
||||
%endif
|
||||
--enable-libshaderc \
|
||||
--enable-vulkan \
|
||||
--disable-cuda-sdk \
|
||||
--enable-libaom \
|
||||
--enable-libaribb24 \
|
||||
--enable-libaribcaption \
|
||||
--enable-libass \
|
||||
--enable-libbluray \
|
||||
--enable-libbs2b \
|
||||
|
|
@ -619,10 +608,12 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
|
|||
--enable-libcdio \
|
||||
--enable-libcodec2 \
|
||||
--enable-libdav1d \
|
||||
--disable-libdavs2 \
|
||||
%if %{with dc1394}
|
||||
--enable-libdc1394 \
|
||||
%endif
|
||||
--enable-libdrm \
|
||||
--enable-libdvdnav \
|
||||
--enable-libdvdread \
|
||||
--enable-libfdk-aac \
|
||||
%if %{with flite}
|
||||
--enable-libflite \
|
||||
|
|
@ -632,16 +623,27 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
|
|||
--enable-libfribidi \
|
||||
--enable-libgme \
|
||||
--enable-libgsm \
|
||||
--enable-libharfbuzz \
|
||||
%if %{with dc1394}
|
||||
--enable-libiec61883 \
|
||||
%endif
|
||||
--enable-libilbc \
|
||||
--enable-libjack \
|
||||
--enable-libjxl \
|
||||
--enable-libklvanc \
|
||||
--disable-liblensfun \
|
||||
--disable-liblcevc-dec \
|
||||
%if %{with lc3}
|
||||
--enable-liblc3 \
|
||||
%endif
|
||||
--enable-libmodplug \
|
||||
--enable-libmp3lame \
|
||||
--enable-libmysofa \
|
||||
--enable-libopenh264-dlopen \
|
||||
--disable-libnpp \
|
||||
--enable-libopencore-amrnb \
|
||||
--enable-libopencore-amrwb \
|
||||
--disable-libopencv \
|
||||
--enable-libopenh264 \
|
||||
--enable-libopenjpeg \
|
||||
--enable-libopenmpt \
|
||||
--enable-libopus \
|
||||
|
|
@ -649,68 +651,98 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
|
|||
--enable-libplacebo \
|
||||
%endif
|
||||
--enable-libpulse \
|
||||
--enable-libqrencode \
|
||||
--disable-libquirc \
|
||||
--enable-librabbitmq \
|
||||
--enable-librav1e \
|
||||
--enable-librist \
|
||||
--enable-librsvg \
|
||||
--enable-librubberband \
|
||||
--enable-libsnappy \
|
||||
%if %{with svtav1}
|
||||
--enable-libsvtav1 \
|
||||
%if %{with librtmp}
|
||||
--enable-librtmp \
|
||||
%endif
|
||||
--enable-librubberband \
|
||||
--enable-libshaderc \
|
||||
--disable-libshine \
|
||||
--enable-libsmbclient \
|
||||
--enable-libsnappy \
|
||||
--enable-libsvtav1 \
|
||||
--enable-libsoxr \
|
||||
--enable-libspeex \
|
||||
--enable-libssh \
|
||||
--enable-libsrt \
|
||||
--enable-libssh \
|
||||
--disable-libtensorflow \
|
||||
--enable-libtesseract \
|
||||
--enable-libtheora \
|
||||
--disable-libtorch \
|
||||
--disable-libuavs3d \
|
||||
--enable-libtwolame \
|
||||
--enable-libv4l2 \
|
||||
--enable-libvidstab \
|
||||
%if %{with vmaf}
|
||||
--enable-libvmaf \
|
||||
%endif
|
||||
--enable-libvo-amrwbenc \
|
||||
--enable-libvorbis \
|
||||
--enable-libv4l2 \
|
||||
%if %{with vpl}
|
||||
--enable-libvpl \
|
||||
%endif
|
||||
--enable-libvpx \
|
||||
--enable-libwebp \
|
||||
--enable-libxml2 \
|
||||
--enable-libzimg \
|
||||
--enable-libzmq \
|
||||
--enable-libzvbi \
|
||||
%if %{with lto}
|
||||
--enable-lto \
|
||||
%endif
|
||||
%if %{with mfx}
|
||||
--enable-libmfx \
|
||||
%endif
|
||||
--enable-lv2 \
|
||||
--enable-vaapi \
|
||||
--enable-vdpau \
|
||||
--enable-libopencore-amrnb \
|
||||
--enable-libopencore-amrwb \
|
||||
--enable-libvo-amrwbenc \
|
||||
%if %{with x264}
|
||||
--enable-libx264 \
|
||||
%endif
|
||||
%if %{with x265}
|
||||
--enable-libx265 \
|
||||
%endif
|
||||
%if %{with librtmp}
|
||||
--enable-librtmp \
|
||||
--disable-libxavs2 \
|
||||
--disable-libxavs \
|
||||
--enable-libxcb \
|
||||
--enable-libxcb-shape \
|
||||
--enable-libxcb-shm \
|
||||
--enable-libxcb-xfixes \
|
||||
%if %{with evc}
|
||||
--enable-libxeve \
|
||||
--enable-libxevd \
|
||||
%endif
|
||||
--enable-libxml2 \
|
||||
--enable-libxvid \
|
||||
--enable-libzimg \
|
||||
--enable-libzmq \
|
||||
--enable-libzvbi \
|
||||
%if %{with lto}
|
||||
--enable-lto \
|
||||
%endif
|
||||
--enable-lv2 \
|
||||
--enable-lzma \
|
||||
--enable-manpages \
|
||||
%if %{with ffnvcodec}
|
||||
--enable-nvdec \
|
||||
--enable-nvenc \
|
||||
%endif
|
||||
--enable-openal \
|
||||
--enable-opencl \
|
||||
--enable-opengl \
|
||||
--disable-openssl \
|
||||
--enable-postproc \
|
||||
--enable-pthreads \
|
||||
--enable-sdl2 \
|
||||
--enable-shared \
|
||||
--enable-swresample \
|
||||
--enable-swscale \
|
||||
--enable-v4l2-m2m \
|
||||
--enable-vaapi \
|
||||
--enable-vapoursynth \
|
||||
--enable-vdpau \
|
||||
--enable-vulkan \
|
||||
--enable-xlib \
|
||||
--enable-zlib \
|
||||
%if %{without all_codecs}
|
||||
--enable-muxers \
|
||||
--enable-demuxers \
|
||||
--enable-hwaccels \
|
||||
--disable-encoders \
|
||||
--disable-decoders \
|
||||
--disable-decoder="h264,hevc,vc1" \
|
||||
--disable-decoder="h264,hevc,libxevd,vc1,vvc" \
|
||||
--enable-encoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <enable_encoders)" \
|
||||
--enable-decoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <enable_decoders)" \
|
||||
%endif
|
||||
|
|
@ -751,7 +783,7 @@ cat config_components.h
|
|||
# Paranoia check
|
||||
%if %{without all_codecs}
|
||||
# DECODER
|
||||
for i in H264 HEVC HEVC_RKMPP VC1; do
|
||||
for i in H264 HEVC HEVC_RKMPP VC1 VVC; do
|
||||
grep -q "#define CONFIG_${i}_DECODER 0" config_components.h
|
||||
done
|
||||
|
||||
|
|
@ -879,20 +911,198 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples
|
|||
%{_mandir}/man3/libswscale.3*
|
||||
|
||||
%changelog
|
||||
* Wed Nov 06 2024 Fabio Valentini <decathorpe@gmail.com> - 5.1.4-3
|
||||
- Rebuild for dav1d 1.5.0
|
||||
* Wed Sep 24 2025 Simone Caronni <negativo17@gmail.com> - 7.1.2-1
|
||||
- Update to 7.1.2.
|
||||
- Enable VANC processing for SDI.
|
||||
- Explicitly list all implicitly enabled/disabled options.
|
||||
|
||||
* Wed Dec 06 2023 Kalev Lember <klember@redhat.com> - 5.1.4-2
|
||||
* Fri Jun 13 2025 Neal Gompa <ngompa@fedoraproject.org> - 7.1.1-4
|
||||
- Switch to regular upstream sources for package build
|
||||
- Enable more codecs
|
||||
|
||||
* Sat Mar 22 2025 Songsong Zhang <U2FsdGVkX1@gmail.com> - 7.1.1-3
|
||||
- Add missing source files for riscv64
|
||||
|
||||
* Thu Mar 13 2025 Fabio Valentini <decathorpe@gmail.com> - 7.1.1-2
|
||||
- Rebuild for noopenh264 2.6.0
|
||||
|
||||
* Thu Mar 06 2025 Dominik Mierzejewski <dominik@greysector.net> - 7.1.1-1
|
||||
- Update to 7.1.1 (resolves rhbz#2349351)
|
||||
- Enable LC3 codec via liblc3
|
||||
- Backport fix for CVE-2025-22921 (resolves rhbz#2346558)
|
||||
|
||||
* Fri Feb 07 2025 Yaakov Selkowitz <yselkowi@redhat.com> - 7.1-1
|
||||
- Rebase to 7.1 (rhbz#2273572)
|
||||
|
||||
* Wed Feb 05 2025 Robert-André Mauchin <zebob.m@gmail.com> - 7.0.2-13
|
||||
- Rebuilt for aom 3.11.0
|
||||
|
||||
* Sun Feb 02 2025 Sérgio Basto <sergio@serjux.com> - 7.0.2-12
|
||||
- Rebuild for jpegxl (libjxl) 0.11.1
|
||||
|
||||
* Wed Jan 29 2025 Simone Caronni <negativo17@gmail.com> - 7.0.2-11
|
||||
- Rebuild for updated VapourSynth.
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.2-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Jan 09 2025 Michel Lind <salimma@fedoraproject.org> - 7.0.2-9
|
||||
- Rebuilt for rubberband 4
|
||||
|
||||
* Tue Nov 12 2024 Sandro Mani <manisandro@gmail.com> - 7.0.2-8
|
||||
- Rebuild (tesseract)
|
||||
|
||||
* Mon Oct 07 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 7.0.2-7
|
||||
- Properly enable aribb24/libaribcaption
|
||||
- Disable VANC dependency as it depends on decklink
|
||||
|
||||
* Mon Oct 07 2024 Neal Gompa <ngompa@fedoraproject.org> - 7.0.2-6
|
||||
- Enable SDI data processing (Kernel Labs VANC) processing
|
||||
- Enable Japanese DVD subtitles/teletext (aribb24/libaribcaption)
|
||||
|
||||
* Mon Oct 07 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 7.0.2-5
|
||||
- Properly enable noopenh264
|
||||
|
||||
* Wed Oct 02 2024 Neal Gompa <ngompa@fedoraproject.org> - 7.0.2-4
|
||||
- Fix chromaprint bcond
|
||||
|
||||
* Wed Sep 25 2024 Michel Lind <salimma@fedoraproject.org> - 7.0.2-3
|
||||
- Disable omxil completely, it's now retired
|
||||
- Rebuild for tesseract-5.4.1-3 (soversion change from 5.4.1 to just 5.4)
|
||||
|
||||
* Fri Sep 20 2024 Neal Gompa <ngompa@fedoraproject.org> - 7.0.2-2
|
||||
- Rebuild for newer ffnvcodec
|
||||
|
||||
* Fri Sep 06 2024 Neal Gompa <ngompa@fedoraproject.org> - 7.0.2-1
|
||||
- Rebase to 7.0.2 (rhbz#2273572)
|
||||
- Drop OpenH264 dlopen headers as we use noopenh264 now
|
||||
- Use modern bconds
|
||||
|
||||
* Sat Aug 24 2024 Fabio Valentini <decathorpe@gmail.com> - 6.1.2-1
|
||||
- Update to 6.1.2
|
||||
|
||||
* Sat Jul 20 2024 Neal Gompa <ngompa@fedoraproject.org> - 6.1.1-19
|
||||
- Backport fixes for Mesa 24.0.6+ / 21.1.4+ changes for VA-API
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.1-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Tue Jul 16 2024 Nicolas Chauvet <kwizart@gmail.com> - 6.1.1-17
|
||||
- Rebuilt for libplacebo/vmaf
|
||||
|
||||
* Wed Jun 19 2024 Dominik Mierzejewski <dominik@greysector.net> - 6.1.1-16
|
||||
- Backport fix for CVE-2023-49528
|
||||
|
||||
* Thu Jun 13 2024 Sandro Mani <manisandro@gmail.com> - 6.1.1-15
|
||||
- Rebuild for tesseract-5.4.1
|
||||
|
||||
* Wed May 29 2024 Robert-André Mauchin <zebob.m@gmail.com> - 6.1.1-14
|
||||
- Rebuild for svt-av1 2.1.0
|
||||
|
||||
* Wed May 22 2024 Simone Caronni <negativo17@gmail.com> - 6.1.1-13
|
||||
- Rebuild for updated VapourSynth.
|
||||
|
||||
* Tue Apr 23 2024 Kalev Lember <klember@redhat.com> - 6.1.1-12
|
||||
- Stop using bundled openh264 headers in F40+ and build against noopenh264
|
||||
- Backport a fix to build with Vulkan headers >= 1.3.280.0
|
||||
|
||||
* Wed Mar 13 2024 Sérgio Basto <sergio@serjux.com> - 6.1.1-11
|
||||
- Rebuild for jpegxl (libjxl) 0.10.2
|
||||
|
||||
* Tue Mar 12 2024 Dominik Mierzejewski <dominik@greysector.net> - 6.1.1-10
|
||||
- Enable drawtext filter (requires libharfbuzz)
|
||||
|
||||
* Wed Feb 14 2024 Sérgio Basto <sergio@serjux.com> - 6.1.1-9
|
||||
- Rebuild for jpegxl (libjxl) 0.9.2 with soname bump
|
||||
|
||||
* Wed Feb 07 2024 Pete Walter <pwalter@fedoraproject.org> - 6.1.1-8
|
||||
- Rebuild for libvpx 1.14.x
|
||||
|
||||
* Sun Jan 28 2024 Sandro Mani <manisandro@gmail.com> - 6.1.1-7
|
||||
- Rebuild (tesseract)
|
||||
|
||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Mon Jan 15 2024 Neal Gompa <ngompa@fedoraproject.org> - 6.1.1-4
|
||||
- Add missing files for some of the libraries to fix riscv64 builds
|
||||
|
||||
* Fri Jan 12 2024 Fabio Valentini <decathorpe@gmail.com> - 6.1.1-3
|
||||
- Rebuild for dav1d 1.3.0
|
||||
|
||||
* Fri Jan 05 2024 Florian Weimer <fweimer@redhat.com> - 6.1.1-2
|
||||
- Backport upstream patch to fix C compatibility issues
|
||||
|
||||
* Thu Jan 04 2024 Neal Gompa <ngompa@fedoraproject.org> - 6.1.1-1
|
||||
- Update to 6.1.1
|
||||
|
||||
* Thu Jan 04 2024 Neal Gompa <ngompa@fedoraproject.org> - 6.1-1
|
||||
- Rebase to 6.1
|
||||
|
||||
* Wed Dec 06 2023 Kalev Lember <klember@redhat.com> - 6.0.1-2
|
||||
- Prefer openh264 over noopenh264
|
||||
- Backport upstream patch to drop openh264 runtime version checks
|
||||
|
||||
* Tue Nov 14 2023 Neal Gompa <ngompa@fedoraproject.org> - 5.1.4-1
|
||||
- Update to 5.1.4
|
||||
* Sat Nov 11 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.0.1-1
|
||||
- Update to 6.0.1
|
||||
- Add ffmpeg chromium support patch (#2240127)
|
||||
- Use git to apply patches
|
||||
|
||||
* Tue Mar 28 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 5.1.3-1
|
||||
- Update to 5.1.3
|
||||
* Fri Nov 10 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.0-16
|
||||
- Add patches to support enhanced RTMP and AV1 encoding through VA-API
|
||||
- Force AAC decoding through fdk-aac-free
|
||||
|
||||
* Sun Oct 08 2023 Dominik Mierzejewski <dominik@greysector.net> - 6.0-15
|
||||
- Backport upstream patch to fix segfault when passing non-existent filter
|
||||
option (rfbz#6773)
|
||||
|
||||
* Sat Oct 07 2023 Sandro Mani <manisandro@gmail.com> - 6.0-14
|
||||
- Rebuild (tesseract)
|
||||
|
||||
* Fri Sep 29 2023 Nicolas Chauvet <nchauvet@linagora.com> - 6.0-13
|
||||
- Rebuilt for libplacebo
|
||||
|
||||
* Fri Aug 25 2023 Dominik Mierzejewski <dominik@greysector.net> - 6.0-12
|
||||
- Backport upstream patch to fix assembly with binutils 2.41.
|
||||
|
||||
* Sat Aug 05 2023 Richard Shaw <hobbes1069@gmail.com> - 6.0-11
|
||||
- Rebuild for codec2.
|
||||
|
||||
* Fri Jul 28 2023 Dominik Mierzejewski <dominik@greysector.net> - 6.0-10
|
||||
- Rebuild for libplacebo
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Jul 14 2023 Sandro Mani <manisandro@gmail.com> - 6.0-8
|
||||
- Rebuild (tesseract)
|
||||
|
||||
* Sun Jun 18 2023 Sérgio Basto <sergio@serjux.com> - 6.0-7
|
||||
- Mass rebuild for jpegxl-0.8.1
|
||||
|
||||
* Mon Jun 12 2023 Dominik Mierzejewski <dominik@greysector.net> - 6.0-6
|
||||
- Rebuild for libdc1394
|
||||
|
||||
* Thu Apr 06 2023 Adam Williamson <awilliam@redhat.com> - 6.0-5
|
||||
- Rebuild (tesseract) again
|
||||
|
||||
* Mon Apr 03 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.0-4
|
||||
- Include RISC-V support sources in the tarball
|
||||
|
||||
* Mon Apr 03 2023 Sandro Mani <manisandro@gmail.com> - 6.0-3
|
||||
- Rebuild (tesseract)
|
||||
|
||||
* Wed Mar 22 2023 Nicolas Chauvet <kwizart@gmail.com> - 6.0-2
|
||||
- Backport upstream patches for libplacebo support
|
||||
|
||||
* Sun Mar 12 2023 Neal Gompa <ngompa@fedoraproject.org> - 6.0-1
|
||||
- Rebase to version 6.0
|
||||
- Enable SVT-AV1 on all architectures
|
||||
- Use oneVPL for QSV
|
||||
- Switch to SPDX license identifiers
|
||||
|
||||
* Wed Feb 15 2023 Neal Gompa <ngompa@fedoraproject.org> - 5.1.2-12
|
||||
- Enable support for the RIST protocol through librist
|
||||
|
|
|
|||
3871
ffmpeg_free_sources
3871
ffmpeg_free_sources
File diff suppressed because it is too large
Load diff
|
|
@ -1,130 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 Andreas Schneider <asn@cryptomilk.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# shellcheck disable=2181
|
||||
|
||||
export LC_COLLATE="C.UTF-8"
|
||||
|
||||
FF_PKGNAME="ffmpeg"
|
||||
FF_PKGNAME_SUFFIX="-free"
|
||||
FF_VERSION="$(rpmspec -P ./*.spec | grep ^Version | sed -e 's/Version:[ ]*//g')"
|
||||
FF_TARBALL_URL="https://ffmpeg.org/releases/${FF_PKGNAME}-${FF_VERSION}.tar.xz"
|
||||
FF_TARBALL="$(basename "${FF_TARBALL_URL}")"
|
||||
FF_GPG_ARMOR_FILE="${FF_TARBALL}.asc"
|
||||
FF_PKG_DIR="$(pwd)"
|
||||
FF_KEYRING="${FF_PKG_DIR}/ffmpeg.keyring"
|
||||
FF_TMPDIR=$(mktemp --tmpdir -d ffmpeg-XXXXXXXX)
|
||||
FF_PATH="${FF_TMPDIR}/${FF_PKGNAME}-${FF_VERSION}"
|
||||
|
||||
cleanup_tmpdir() {
|
||||
# shellcheck disable=2164
|
||||
popd 2>/dev/null
|
||||
rm -rf "${FF_TMPDIR}"
|
||||
}
|
||||
trap cleanup_tmpdir SIGINT
|
||||
|
||||
cleanup_and_exit()
|
||||
{
|
||||
cleanup_tmpdir
|
||||
|
||||
if test "$1" = 0 -o -z "$1"; then
|
||||
exit 0
|
||||
else
|
||||
# shellcheck disable=2086
|
||||
exit ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ ! -w "${FF_TARBALL}" ]]; then
|
||||
echo ">>> Downloading tarball"
|
||||
wget "${FF_TARBALL_URL}"
|
||||
fi
|
||||
if [[ ! -w "${FF_TARBALL}.asc" ]]; then
|
||||
echo ">>> Downloading signature"
|
||||
wget "${FF_TARBALL_URL}.asc"
|
||||
fi
|
||||
|
||||
echo ">>> Verifying ${FF_TARBALL} GPG signature"
|
||||
gpgv2 --quiet --keyring "${FF_KEYRING}" "${FF_GPG_ARMOR_FILE}" "${FF_TARBALL}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: GPG signature verification failed"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
echo
|
||||
|
||||
echo ">>> Unpacking ${FF_TARBALL}"
|
||||
|
||||
tar -xf "${FF_TARBALL}" -C "${FF_TMPDIR}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to unpack ${FF_TARBALL}"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -r ffmpeg_free_sources ]]; then
|
||||
echo "ERROR: ffmpeg_free_sources doesn't exist!"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
readarray -t keepfiles < ffmpeg_free_sources
|
||||
|
||||
pushd "${FF_PATH}" || cleanup_and_exit 1
|
||||
|
||||
echo
|
||||
echo ">>> Cleaning up sources for new tarball ..."
|
||||
|
||||
# Get file list from ffmpeg
|
||||
mapfile -d '' filelist < <(find ./ -type f -printf '%P\0')
|
||||
|
||||
# Sort arrays
|
||||
readarray -t keepfiles_sorted < <(printf '%s\0' "${keepfiles[@]}" | sort -z | xargs -0n1)
|
||||
readarray -t filelist_sorted < <(printf '%s\0' "${filelist[@]}" | sort -z | xargs -0n1)
|
||||
|
||||
# Compare arrays and remove files which are left over
|
||||
comm -2 -3 -z <(printf '%s\0' "${filelist_sorted[@]}") <(printf '%s\0' "${keepfiles_sorted[@]}") | xargs -0 rm -f
|
||||
|
||||
readarray -t removed_files < <(comm -1 -3 -z <(printf '%s\0' "${filelist_sorted[@]}") <(printf '%s\0' "${keepfiles_sorted[@]}") | xargs -0n1)
|
||||
if [[ "${#removed_files[@]}" -ge 1 ]]; then
|
||||
if [[ "${#removed_files[@]}" -eq 1 ]] && [[ -z "${removed_files[0]}" ]]; then
|
||||
echo "... done"
|
||||
else
|
||||
echo "File not in upstream tarball anymore (please cleanup 'ffmpeg_free_sources'):"
|
||||
for f in "${removed_files[@]}"; do
|
||||
if [[ -z "${f}" ]]; then
|
||||
continue
|
||||
fi
|
||||
echo " * ${f}"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
|
||||
popd || cleanup_and_exit 1 # /FF_PATH
|
||||
|
||||
pushd "${FF_TMPDIR}" || cleanup_and_exit 1
|
||||
|
||||
echo ">>> Create new tarball ${FF_PKGNAME}${FF_PKGNAME_SUFFIX}-${FF_VERSION}.tar.xz ..."
|
||||
tar -cJf "${FF_PKG_DIR}/${FF_PKGNAME}${FF_PKGNAME_SUFFIX}-${FF_VERSION}.tar.xz" "${FF_PKGNAME}-${FF_VERSION}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Creating tarball failed"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
|
||||
popd || cleanup_and_exit 1 # /FF_TMPDIR
|
||||
|
||||
du -sh "${FF_PKGNAME}${FF_PKGNAME_SUFFIX}-${FF_VERSION}.tar.xz"
|
||||
echo
|
||||
|
||||
cleanup_and_exit 0
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 Andreas Schneider <asn@cryptomilk.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# shellcheck disable=2181
|
||||
|
||||
export LC_COLLATE="C.UTF-8"
|
||||
|
||||
cleanup_and_exit()
|
||||
{
|
||||
if test "$1" = 0 -o -z "$1"; then
|
||||
exit 0
|
||||
else
|
||||
# shellcheck disable=2086
|
||||
exit ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
echo ">>> Collect information from ${1}"
|
||||
build_log="$(readlink -f "${1}")"
|
||||
if [[ -z "${build_log}" ]] || [[ ! -r "${build_log}" ]]; then
|
||||
echo "Build log doesn't exist: %{build_log}"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
|
||||
asm_files="$(grep "^gcc.*\.c$" "${build_log}" | awk 'NF>1{print $NF}' | sort)"
|
||||
c_files="$(grep "^nasm.*\.asm$" "${build_log}" | awk 'NF>1{print $NF}' | sort)"
|
||||
|
||||
# shellcheck disable=2206
|
||||
new_sources=(${asm_files}
|
||||
${c_files})
|
||||
|
||||
# Sort arrays
|
||||
readarray -t new_sources_sorted < <(printf '%s\0' "${new_sources[@]}" | sort -z | xargs -0n1)
|
||||
|
||||
# Create a backup for a diff
|
||||
cp -a ffmpeg_free_sources ffmpeg_free_sources.orig
|
||||
cp -a ffmpeg_free_sources ffmpeg_free_sources.new
|
||||
printf "%s\n" "${new_sources_sorted[@]}" >> ffmpeg_free_sources.new
|
||||
# Update ffmpeg_free_sources
|
||||
echo ">>> Updating ffmpeg_free_sources"
|
||||
sort < ffmpeg_free_sources.new | uniq | sed '/^$/d' > ffmpeg_free_sources
|
||||
echo ">>> Differences in file list"
|
||||
diff -u ffmpeg_free_sources.orig ffmpeg_free_sources
|
||||
rm -f ffmpeg_free_sources.new
|
||||
|
||||
cleanup_and_exit 0
|
||||
5
sources
5
sources
|
|
@ -1,4 +1,3 @@
|
|||
SHA512 (ffmpeg-free-5.1.4.tar.xz) = 73365770b6049528d08fb199de30d61c31327f050d66d87876d26388cc85feaae5c2f1cad6b06f34c7fbb28a1dff0df55d15653f7f5e216e9662cfe902bd8d5a
|
||||
SHA512 (ffmpeg-5.1.4.tar.xz.asc) = f161815d47c988f8b6281a95f22301d07a22ddc41a2a84bfc126b4d7de0e9175da499c2cc15b3bdaa415af0e8ed1d2b4d52096a81b4a3d804effb00ff9e8ec5b
|
||||
SHA512 (ffmpeg-dlopen-headers.tar.xz) = 97e6986fc2bb9dfa4516135a76b04d27ceb52ff96f0af21a6169919aeefefb4d2e2e24a771959689cdbec385f5d71614ba661223c67c0e94089a6dd823a30099
|
||||
SHA512 (ffmpeg-7.1.2.tar.xz) = 181e6415da359e3addbc448ff09b5cebe57d9c37106e5125c41f484adebc250502fc9efe150cb117d7378e20830715035be94c2ba4ad7c369b18af85f1a4ca20
|
||||
SHA512 (ffmpeg-7.1.2.tar.xz.asc) = b0358cea13be070a0d41b42e98c5df17ab8794b86a5f8b2a4bf0043e608a21b02fdbaad2bc3318457a9c43ef0d3c823509234ffd7292e6ea49b1eff951663f58
|
||||
SHA512 (ffmpeg.keyring) = 9b36506835db36f776b7ddb53ad6fa9e915e6ca2f9c7cfebe8eb45513e1036a985283590a840ca313a111bf35dc3731f68885aaafb1fb7011ec433cc119e5165
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue