SHA256
1
0
forked from jengelh/ffmpeg-7

Compare commits

32 Commits

Author SHA256 Message Date
89aa33ff4f Reword work-around-abi-break.patch 2025-07-23 15:33:52 +02:00
b2122e4c37 Bump changelog date for vvenc addition 2025-07-23 15:29:16 +02:00
500bdcfaa8 Merge 'Add vvenc build conditional' (#20)
Reviewed-on: jengelh/ffmpeg-7#20
2025-07-23 15:28:08 +02:00
Hans-Peter Jansen
70af22cdf4 Add vvenc build conditional 2025-07-23 10:31:12 +02:00
Jonathan Kang
abbd0684ea Add ffmpeg-CVE-2025-7700.patch 2025-07-23 15:17:30 +08:00
0c40ed06d0 Use more pkgconfig() symbols for BuildRequires 2025-06-25 12:15:36 +02:00
Yifan J
efa133d10d Build with noopenh264, drop ffmpeg-dlopen-openh264.patch 2025-06-25 16:55:31 +08:00
2c113ed6f6 Enable libiec61883 integration 2025-06-12 19:53:15 +02:00
52f95e9110 Update changelog to add CVE fix entry for CVE-2024-36618 CVE-2024-36617 CVE-2024-36616 CVE-2024-36619 CVE-2024-36615 2025-05-28 19:52:56 +08:00
7ec55b5f78 Reorder user-facing changelog to be in sequence
References: https://bugzilla.opensuse.org/1242310
2025-05-06 03:05:17 +02:00
a150aa6c2e Add bugID recored in n7.1.1 log. With this, maintiance team will allow to submit Factory source to SLE. Avoid bug fix lost. Also fix some old grammar typos. 2025-04-16 13:49:58 +08:00
f281b98b9b Revert "Build with OpenVINO support in libavfilter"
This reverts commit ce60e9ed66.

Too many build-time dependencies.
2025-04-04 11:34:44 +02:00
5f822c5560 Bump mini's version 2025-04-02 02:07:52 +02:00
10630669eb ffmpeg 7.1.1 2025-04-02 02:06:23 +02:00
a40564ee7c Fix BcntSync handling 2025-03-27 11:18:53 +01:00
09f8124ff4 Disable openvino on 32-bit 2025-03-26 21:25:23 +01:00
b1d5de540b Merge 'refs/pull/13/head' 2025-03-25 22:11:38 +01:00
10be3a7196 Add ffmpeg-7-CVE-2025-1816.patch: Backporting 0526535c from upstream, add missing constrains for num_parameters in audio_element_oub(). (CVE-2025-1816, bsc#1238728) and add some lost CVE bugID into the changelog. 2025-03-24 14:32:47 +08:00
ce60e9ed66 Build with OpenVINO support in libavfilter 2025-03-24 00:25:11 +01:00
d27a94528c Add 0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch 2025-03-05 10:46:17 +01:00
40e49d492e Add security fix record on the update history. (CVE-2024-35368, bsc#1234028) 2025-03-01 20:13:07 +08:00
fba0c8d5ae Add BcntSyncTag directive 2025-02-24 14:06:39 +01:00
90e1a4148e Add 4 patches for 8 CVEs
* CVE-2024-12361
* CVE-2024-35365
* CVE-2024-36613
* CVE-2025-0518
* CVE-2025-22919
* CVE-2025-22920
* CVE-2025-22921
* CVE-2025-25473
2025-02-23 21:23:54 +01:00
32cbe46280 Adjust bconds to build the package in SLFO without xvidcore. 2024-10-15 11:02:13 +02:00
d30cb95aec ffmpeg 7.1 2024-10-02 10:32:42 +02:00
Olaf Hering
e2cfa392ea avcodec/decode: clean-up if get_hw_frames_parameters fails (ffmpeg#11013, vlc#28811)
Signed-off-by: Olaf Hering <olaf@aepfle.de>
2024-09-30 12:34:56 +00:00
Stefan Dirsch
47633c77ba no longer build against libmfx; build also 15.5 against libvpl 2024-09-26 12:23:18 +02:00
baf5b4d954 Add use 64bit for input size check log entry for n7.0.2's update, to record security fix position. (CVE-2024-7055, bsc#1229026) 2024-09-18 10:05:51 +02:00
f803df26e3 Add 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch (armv7 build fix) 2024-08-21 12:12:29 +02:00
62e69514f7 Delete unreferenced patches 2024-08-10 10:05:05 +02:00
c18297e308 Copy first preamble to second preamble 2024-08-10 00:56:47 +02:00
ab72df490f Delete unreferenced patches 2024-08-08 19:27:36 +02:00
18 changed files with 422 additions and 645 deletions

View File

@@ -0,0 +1,33 @@
From d1ed5c06e3edc5f2b5f3664c80121fa55b0baa95 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <ffmpeg@gyani.pro>
Date: Sat, 22 Feb 2025 10:38:53 +0530
Subject: [PATCH] avcodec/libsvtav1: unbreak build with latest svtav1
SVT-AV1 made a change in their public API in 988e930c but without a
version bump or any other accessible marker, thus breaking ffmpeg build
with current versions of SVT-AV1.
They have finally bumped versions a month later, so check added.
---
libavcodec/libsvtav1.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 79b28eb4df..43fe531fde 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -435,7 +435,11 @@ static av_cold int eb_enc_init(AVCodecContext *avctx)
svt_enc->eos_flag = EOS_NOT_REACHED;
+#if SVT_AV1_CHECK_VERSION(3, 0, 0)
+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params);
+#else
svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params);
+#endif
if (svt_ret != EB_ErrorNone) {
return svt_print_error(avctx, svt_ret, "Error initializing encoder handle");
}
--
2.48.1

View File

@@ -0,0 +1,27 @@
From: François Cartegnie <fcvlcdev@free.fr>
Date: Mon, 13 May 2024 11:37:27 +0000
Subject: avcodec/decode: clean-up if get_hw_frames_parameters fails
https://trac.ffmpeg.org/ticket/11013
https://code.videolan.org/videolan/vlc/-/issues/28811
Fixes the following assert:
[00007f1df83d17e0] vaapi generic error: avcodec_get_hw_frames_parameters failed: -22
Assertion p_dst->hwaccel_threadsafe || (!dst->hwaccel && !dst->internal->hwaccel_priv_data) failed at libavcodec/pthread_frame.c:349
Reproduced from VLC with VAAPI, when fallbacking from hw to sw.
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -344,6 +344,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
return err;
}
+ // hwaccel could have failed init due to some params
+ if(!dst->hwaccel && dst->internal->hwaccel_priv_data)
+ ff_hwaccel_uninit(dst);
+
// reset dst hwaccel state if needed
av_assert0(p_dst->hwaccel_threadsafe ||
(!dst->hwaccel && !dst->internal->hwaccel_priv_data));

View File

@@ -1,54 +0,0 @@
From 459648761f5412acdc3317d5bac982ceaa257584
Author: Niklas Haas <git@haasn.dev>
Date: Sat Apr 6 13:11:09 2024 +0200
Subject: avcodec/hevcdec: fix segfault on invalid film grain metadata
References: CVE-2024-32228
References: https://bugzilla.opensuse.org/1227277
Upstream: Backport from upstream
Invalid input files may contain film grain metadata which survives
ff_h274_film_grain_params_supported() but does not pass
av_film_grain_params_select(), leading to a SIGSEGV on hevc_frame_end().
Fix this by duplicating the av_film_grain_params_select() check at frame
init time.
An alternative solution here would be to defer the incompatibility check
to hevc_frame_end(), but this has the downside of allocating a film
grain buffer even when we already know we can't apply film grain.
Fixes: https://trac.ffmpeg.org/ticket/10951
--- ffmpeg-7.0/libavcodec/hevcdec.c
+++ ffmpeg-7.0_new/libavcodec/hevcdec.c
@@ -2892,10 +2892,16 @@
!(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) &&
!s->avctx->hwaccel;
+ ret = set_side_data(s);
+ if (ret < 0)
+ goto fail;
+
if (s->ref->needs_fg &&
- s->sei.common.film_grain_characteristics.present &&
- !ff_h274_film_grain_params_supported(s->sei.common.film_grain_characteristics.model_id,
- s->ref->frame->format)) {
+ ( s->sei.common.film_grain_characteristics.present &&
+ !ff_h274_film_grain_params_supported(s->sei.common.film_grain_characteristics.model_id,
+ s->ref->frame->format))
+ || !av_film_grain_params_select(s->ref->frame)) {
+
av_log_once(s->avctx, AV_LOG_WARNING, AV_LOG_DEBUG, &s->film_grain_warning_shown,
"Unsupported film grain parameters. Ignoring film grain.\n");
s->ref->needs_fg = 0;
@@ -2909,10 +2915,6 @@
goto fail;
}
- ret = set_side_data(s);
- if (ret < 0)
- goto fail;
-
s->frame->pict_type = 3 - s->sh.slice_type;
if (!IS_IRAP(s))

View File

@@ -1,38 +0,0 @@
From a528a54ee119dcba47e7c9e30d3a56206fbad416 Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Thu, 4 Jul 2024 14:55:23 -0300
Subject: [PATCH] avfilter/vf_tiltandshift: fix buffer offset for yuv422p input
Fixes ticket #10950.
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavfilter/vf_tiltandshift.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c
index 85cce84fc3..b49a713339 100644
--- a/libavfilter/vf_tiltandshift.c
+++ b/libavfilter/vf_tiltandshift.c
@@ -175,14 +175,14 @@ static void copy_column(AVFilterLink *outlink,
const uint8_t *src[4];
dst[0] = dst_data[0] + ncol;
- dst[1] = dst_data[1] + (ncol >> s->desc->log2_chroma_h);
- dst[2] = dst_data[2] + (ncol >> s->desc->log2_chroma_h);
+ dst[1] = dst_data[1] + (ncol >> s->desc->log2_chroma_w);
+ dst[2] = dst_data[2] + (ncol >> s->desc->log2_chroma_w);
if (!tilt)
ncol = 0;
src[0] = src_data[0] + ncol;
- src[1] = src_data[1] + (ncol >> s->desc->log2_chroma_h);
- src[2] = src_data[2] + (ncol >> s->desc->log2_chroma_h);
+ src[1] = src_data[1] + (ncol >> s->desc->log2_chroma_w);
+ src[2] = src_data[2] + (ncol >> s->desc->log2_chroma_w);
av_image_copy(dst, dst_linesizes, src, src_linesizes, outlink->format, 1, outlink->h);
}
--
2.41.0

View File

@@ -1,25 +0,0 @@
From 96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Mon Apr 8 18:38:42 2024 +0200
Subject: avcodec/mpegvideo_enc: Fix 1 line and one column images
References: CVE-2024-32230
References: https://bugzilla.opensuse.org/1227296
Upstream: Backport from upstream
Fixes: Ticket10952
Fixes: poc21ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
--- ffmpeg-7.0/libavcodec/mpegvideo_enc.c
+++ ffmpeg-7.0_new/libavcodec/mpegvideo_enc.c
@@ -1198,8 +1198,8 @@
ptrdiff_t dst_stride = i ? s->uvlinesize : s->linesize;
int h_shift = i ? s->chroma_x_shift : 0;
int v_shift = i ? s->chroma_y_shift : 0;
- int w = s->width >> h_shift;
- int h = s->height >> v_shift;
+ int w = AV_CEIL_RSHIFT(s->width , h_shift);
+ int h = AV_CEIL_RSHIFT(s->height, v_shift);
const uint8_t *src = pic_arg->data[i];
uint8_t *dst = pic->f->data[i];
int vpad = 16;

View 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.44.0

View File

@@ -0,0 +1,26 @@
From c08d300481b8ebb846cd43a473988fdbc6793d1b Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Fri, 17 Jan 2025 00:05:31 -0300
Subject: [PATCH] avformat/avformat: also clear FFFormatContext packet queue
when closing a muxer
packet_buffer is used in mux.c, and if a muxing process fails at a point where
packets remained in said queue, they will leak.
Fixes ticket #11419
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavformat/avformat.c | 1 +
1 file changed, 1 insertion(+)
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -184,6 +184,7 @@
av_dict_free(&si->id3v2_meta);
av_packet_free(&si->pkt);
av_packet_free(&si->parse_pkt);
+ avpriv_packet_list_free(&si->packet_buffer);
av_freep(&s->streams);
av_freep(&s->stream_groups);
ff_flush_packet_queue(s);

View File

@@ -1,113 +0,0 @@
From 5b87869c09cece1583e74b6f796aa825a4765631 Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Wed, 31 Jul 2024 22:19:53 -0300
Subject: [PATCH] avformat/mov: fix track handling when mixing IAMF and video
tracks
Fixes crashes when muxing the two together.
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavformat/movenc.c | 37 ++++++++++++++++++++++++++++---------
1 file changed, 28 insertions(+), 9 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e40948edb8..d20d0bc064 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -7149,7 +7149,9 @@ static int mov_create_dvd_sub_decoder_specific_info(MOVTrack *track,
static int mov_init_iamf_track(AVFormatContext *s)
{
MOVMuxContext *mov = s->priv_data;
- MOVTrack *track = &mov->tracks[0]; // IAMF if present is always the first track
+ MOVTrack *track;
+ IAMFContext *iamf;
+ int first_iamf_idx = INT_MAX, last_iamf_idx = 0;
int nb_audio_elements = 0, nb_mix_presentations = 0;
int ret;
@@ -7171,24 +7173,24 @@ static int mov_init_iamf_track(AVFormatContext *s)
return AVERROR(EINVAL);
}
- track->iamf = av_mallocz(sizeof(*track->iamf));
- if (!track->iamf)
+ iamf = av_mallocz(sizeof(*iamf));
+ if (!iamf)
return AVERROR(ENOMEM);
+
for (int i = 0; i < s->nb_stream_groups; i++) {
const AVStreamGroup *stg = s->stream_groups[i];
switch(stg->type) {
case AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT:
for (int j = 0; j < stg->nb_streams; j++) {
- track->first_iamf_idx = FFMIN(stg->streams[j]->index, track->first_iamf_idx);
- track->last_iamf_idx = FFMAX(stg->streams[j]->index, track->last_iamf_idx);
- stg->streams[j]->priv_data = track;
+ first_iamf_idx = FFMIN(stg->streams[j]->index, first_iamf_idx);
+ last_iamf_idx = FFMAX(stg->streams[j]->index, last_iamf_idx);
}
- ret = ff_iamf_add_audio_element(track->iamf, stg, s);
+ ret = ff_iamf_add_audio_element(iamf, stg, s);
break;
case AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION:
- ret = ff_iamf_add_mix_presentation(track->iamf, stg, s);
+ ret = ff_iamf_add_mix_presentation(iamf, stg, s);
break;
default:
av_assert0(0);
@@ -7197,8 +7199,20 @@ static int mov_init_iamf_track(AVFormatContext *s)
return ret;
}
+ track = &mov->tracks[first_iamf_idx];
+ track->iamf = iamf;
+ track->first_iamf_idx = first_iamf_idx;
+ track->last_iamf_idx = last_iamf_idx;
track->tag = MKTAG('i','a','m','f');
+ for (int i = 0; i < s->nb_stream_groups; i++) {
+ AVStreamGroup *stg = s->stream_groups[i];
+ if (stg->type != AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT)
+ continue;
+ for (int j = 0; j < stg->nb_streams; j++)
+ stg->streams[j]->priv_data = track;
+ }
+
ret = avio_open_dyn_buf(&track->iamf_buf);
if (ret < 0)
return ret;
@@ -7209,6 +7223,7 @@ static int mov_init_iamf_track(AVFormatContext *s)
static int mov_init(AVFormatContext *s)
{
MOVMuxContext *mov = s->priv_data;
+ int has_iamf = 0;
int i, ret;
mov->fc = s;
@@ -7359,6 +7374,7 @@ static int mov_init(AVFormatContext *s)
}
st->priv_data = st;
}
+ has_iamf = 1;
if (!mov->nb_tracks) // We support one track for the entire IAMF structure
mov->nb_tracks++;
@@ -7455,8 +7471,11 @@ static int mov_init(AVFormatContext *s)
for (int j = 0, i = 0; j < s->nb_streams; j++) {
AVStream *st = s->streams[j];
- if (st != st->priv_data)
+ if (st != st->priv_data) {
+ if (has_iamf)
+ i += has_iamf--;
continue;
+ }
st->priv_data = &mov->tracks[i++];
}
--
2.41.0

BIN
ffmpeg-7.0.2.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQFMBAABCgA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmatZQYYHGZmbXBlZy1k
ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYIlcIAKF1VWqnhhKkBHSxEnH8ipUH
nlJmPitKaJTwgtAtHGH8DL4XlgUwxfws9YohJ6V2fz/LjD+4rcU1BB9lMKNTaEW3
g27lIRHXC571OGgBKJFadhsbULtUu9oUOIcqS28zOl3fsok/G7NVd3ajkpiRUPhu
LRXUXNbCIwtXbIdS0yECpiRcHMj/hX6nkY3yHrmWXAts/TtmIQyaNTbnC4ervA1s
Ijc4cY/unb6OD9DpmC6DznVykyfzc2GjjCiNxRXrljp+MaZ7jBEMwjXfOIATwBwj
gCN+N6nlxc5e3gMOGcAJy93iD9HpbgVDAn6S6jnB/z5+Tyv6ZeP+sytsgOCNjlQ=
=R372
-----END PGP SIGNATURE-----

BIN
ffmpeg-7.1.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

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

@@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQFMBAABCgA2FiEE/PmG6hXm4pOlZE8QtDIvBNZ2WNgFAmfE+J4YHGZmbXBlZy1k
ZXZlbEBmZm1wZWcub3JnAAoJELQyLwTWdljYNAwH/3i5n8X6+6Gw+1U+k6Lfwe4t
d1AmG/XyJd3ZkqnSXmtpW/p/DoHaRQLTJMHq/5jWi0Dcpr8M8VD0pZxzEksfy0XY
xHEqKXRG37/SyoiH39+BXWOSry4shIhzTVfmQi9QGZ0i69J+ZOpP1cImWz2c6QBM
Q2FMPv1QMVNR2UWHDGgYAvvg2qfJfGgIdQQtvAQe1q3co6LuaZC0ndgoNmNyuPLV
nNmsoetZucoNC4M7kcevyssrRMDi+yHk5X86LfV/cBY+BKP9X8u8pieXrnctSYAh
qqBnsg4jSj3fB96QvsFsdbUWEECKm4/gWJngMQTMk2Tg0RpQAwfHvp21Lppo/xw=
=xzGf
-----END PGP SIGNATURE-----

View File

@@ -1,3 +1,173 @@
-------------------------------------------------------------------
Wed Jul 23 13:28:49 UTC 2025 - Hans-Peter Jansen <hp@urpla.net>
- Add vvenc build conditional
-------------------------------------------------------------------
Wed Jul 23 07:01:22 UTC 2025 - SongChuan Kang <sckang@suse.com>
- Add ffmpeg-CVE-2025-7700.patch: Add check for the return value
of av_malloc_array() and av_calloc() to avoid potential NULL
pointer dereference(CVE-2025-7700, bsc#1246790).
-------------------------------------------------------------------
Wed Jun 25 08:40:15 UTC 2025 - Yifan Jiang <yfjiang@suse.com>
- Built with noopenh264, drop ffmpeg-dlopen-openh264.patch
(jsc#PED-12607)
-------------------------------------------------------------------
Thu Jun 12 17:48:49 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Enable libiec61883 integration [boo#1244453]
-------------------------------------------------------------------
Fri Apr 4 09:34:14 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Disable OpenVINO, too many dependencies for Factory ring1.
-------------------------------------------------------------------
Tue Apr 1 23:38:08 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Update to release 7.1.1
* avformat/wavdec: Fix overflow of intermediate in
block_align check
* avformat/dvdvideodec: drop packets with unset PTS or DTS
* avutil/timecode: Avoid fps overflow in
av_timecode_get_smpte_from_framenum()
* avcodec/mjpegdec: Disallow progressive bayer images
* avformat/mov: don't unconditionally set all audio packets
in fragments as key frames
* avcodec/libx265: resolve build failure for
libx265.so.n, n >= 213
* avfilter/buffersrc: check for valid sample rate.
(CVE-2025-22919, bsc#1237371)
* avfilter/af_pan: Fix sscanf() use.
(CVE-2025-0518, bsc#1236007)
* avformat/iamf_parse: add missing constrains for num_parameters
in audio_element_oub().
(CVE-2025-1816, bsc#1238728)
- Delete ffmpeg-7-CVE-2025-22919.patch,
ffmpeg-7-CVE-2025-0518.patch, ffmpeg-7-CVE-2025-1816.patch
(merged)
-------------------------------------------------------------------
Tue Mar 25 11:48:21 UTC 2025 - Adrian Schröter <adrian@suse.de>
- Move BcntSync tag to the %else part where the mini package gets defined
-------------------------------------------------------------------
Sun Mar 23 23:21:26 UTC 2025 - Mia Herkt <mia@0x0.st>
- Build with OpenVINO support in libavfilter
-------------------------------------------------------------------
Sun Mar 23 15:33:59 UTC 2025 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-CVE-2025-1816.patch:
Backport 0526535c from upstream, add missing constrains for
num_parameters in audio_element_oub().
(CVE-2025-1816, bsc#1238728)
-------------------------------------------------------------------
Wed Mar 5 09:46:09 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Add 0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch
to build with SVT-AV1 3.0.0.
-------------------------------------------------------------------
Fri Feb 19 05:17:22 UTC 2025 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-CVE-2025-22921.patch:
Backport 7f9c7f98 from upstream, clear array length when
freeing it.
(CVE-2025-22921, bsc#1237382)
-------------------------------------------------------------------
Fri Feb 19 04:27:06 UTC 2025 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-CVE-2025-25473.patch:
Backport c08d3004 from upstream, clear FFFormatContext packet.
When packet_buffer is used in mux.c, and if a muxing process fails
at a point where packets remained in said queue.
(CVE-2025-25473, bsc#1237351)
-------------------------------------------------------------------
Fri Feb 19 03:18:02 UTC 2025 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-CVE-2025-0518.patch:
Backport b5b6391d from upstream, fixes memory data leak when
use sscanf().
(CVE-2025-0518, bsc#1236007)
-------------------------------------------------------------------
Fri Feb 19 02:58:01 UTC 2025 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-CVE-2025-22919.patch:
Backport 1446e37d from upstream, check for valid sample rate
As the sample rate <= 0 is invalid.
(CVE-2025-22919, bsc#1237371)
-------------------------------------------------------------------
Tue Oct 15 08:18:54 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Adjust bconds to build the package in SLFO without xvidcore.
-------------------------------------------------------------------
Wed Oct 2 08:20:18 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 7.1
* ffmpeg CLI filtergraph chaining
* pad_vaapi, drawbox_vaapi filters
* vf_scale supports secondary ref input and framesync options
* vf_scale2ref deprecated
* removed DEC Alpha DSP and support code
* perlin video source
* Cropping metadata parsing and writing in Matroska and MP4/MOV
de/muxers
* YUV colorspace negotiation for codecs and filters, obsoleting
the YUVJ pixel format
* Vulkan H.264 and H.265 encoders
* stream specifiers in fftools can now match by stream
disposition
* LCEVC enhancement data exporting in H.26x and MP4/ISOBMFF
* LCEVC filter
* avcodec/mpegvideo_enc: Add check for av_packet_new_side_data (CVE-2024-12361, bsc#1237358)
* avformat/dump: print only the actual streams in a tile grid group (CVE-2025-22920, bsc#1237380)
* avcodec/rkmppdec: Fix double-free on error (CVE-2024-35368, bsc#1234028)
* avcodec/wavarc: fix signed integer overflow in block type 6/19 (CVE-2024-36619, bsc#1234023)
* avcodec/vp9: Fix race when attaching side-data for show-existing frame (CVE-2024-36615, bsc#1234017)
- Delete patches/ffmpeg-7-fix-crashes.patch,
0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch (merged)
-------------------------------------------------------------------
Mon Sep 30 12:34:56 UTC 2024 - olaf@aepfle.de
- Fix assertion due to missing priv_data cleanup on failed VAAPI
acceleration with 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
(ffmpeg#11013, vlc#28811)
-------------------------------------------------------------------
Thu Sep 26 10:02:20 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- no longer build against libmfx; build also 15.5 against libvpl
(boo#1230983, boo#1219494)
- dropping support for libmfx below covers:
* libmfx: improper input validation (CVE-2023-48368, bsc#1226897)
* libmfx: improper buffer restrictions (CVE-2023-45221, bsc#1226898)
* libmfx: out-of-bounds read (CVE-2023-22656, bsc#1226899)
* libmfx: out-of-bounds write (CVE-2023-47282, bsc#1226900)
* libmfx: improper buffer restrictions (CVE-2023-47169, bsc#1226901)
* Multiple vulnerabilities in the Intel Media SDK (libmfx1) (bsc#1226892)
* Drop libmfx dependency from our product (jira #PED-10024)
-------------------------------------------------------------------
Wed Aug 21 09:58:42 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Add 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
to resolve build failure on armv7 [boo#1229338]
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Aug 7 07:37:24 UTC 2024 - Cliff Zhao <qzhao@suse.com> Wed Aug 7 07:37:24 UTC 2024 - Cliff Zhao <qzhao@suse.com>
@@ -23,6 +193,17 @@ Wed Aug 7 07:37:24 UTC 2024 - Cliff Zhao <qzhao@suse.com>
* avcodec/hevcdec: fix segfault on invalid film grain metadata (CVE-2024-32228, bsc#1227277) * avcodec/hevcdec: fix segfault on invalid film grain metadata (CVE-2024-32228, bsc#1227277)
* avfilter/vf_tiltandshift: fix buffer offset for yuv422p input (CVE-2024-32229, bsc#1227295) * avfilter/vf_tiltandshift: fix buffer offset for yuv422p input (CVE-2024-32229, bsc#1227295)
* avcodec/mpegvideo_enc: Fix 1 line and one column images (CVE-2024-32230, bsc#1227296) * avcodec/mpegvideo_enc: Fix 1 line and one column images (CVE-2024-32230, bsc#1227296)
* avcodec/pnmdec: Use 64bit for input size check (CVE-2024-7055, bsc#1229026)
* fftools/ffmpeg_mux_init: Fix double-free on error (CVE-2024-35365, bsc#1235091)
* avformat/dxa: Adjust order of operations around block align (CVE-2024-36613, bsc#1235092)
* avfilter/vf_minterpolate: Check pts before division (CVE-2023-51798, bsc#1223304)
* avfilter/vf_weave: Fix odd height handling (CVE-2023-51793, bsc#1223272)
* avfilter/vf_gradfun: Do not overread last line (CVE-2023-50010, bsc#1223256)
* avfilter/af_stereowiden: Check length (CVE-2023-51794, bsc#1223437)
* avutil/hwcontext: Don't assume frames_uninit is reentrant (CVE-2024-31578, bsc#1223070)
* avformat/avidec: Fix integer overflow iff ULONG_MAX < INT64_MAX (CVE-2024-36618, bsc#1234020)
* avformat/cafdec: dont seek beyond 64bit (CVE-2024-36617, bsc#1234019)
* avformat/westwood_vqa: Fix 2g packets (CVE-2024-36616, bsc#1234018)
- Drop ffmpeg-7-CVE-2024-32228.patch: - Drop ffmpeg-7-CVE-2024-32228.patch:
The fix has been merged. The fix has been merged.
- Drop ffmpeg-7-CVE-2024-32229.patch: - Drop ffmpeg-7-CVE-2024-32229.patch:
@@ -34,14 +215,14 @@ Wed Aug 7 07:37:24 UTC 2024 - Cliff Zhao <qzhao@suse.com>
Sat Aug 3 08:52:26 UTC 2024 - Cliff Zhao <qzhao@suse.com> Sat Aug 3 08:52:26 UTC 2024 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-fix-crashes.patch: - Add ffmpeg-7-fix-crashes.patch:
Backporting 5b87869c from upstream, fix track handling when mixing Backport 5b87869c from upstream, fix track handling when mixing
IAMF and video tracks, Fixes crashes when muxing the two together. IAMF and video tracks, Fixes crashes when muxing the two together.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 5 14:18:52 UTC 2024 - Cliff Zhao <qzhao@suse.com> Tue Jul 5 14:18:52 UTC 2024 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-CVE-2024-32229.patch: - Add ffmpeg-7-CVE-2024-32229.patch:
Backporting a528a54e from upstream, Fix buffer offset for yuv422p Backport a528a54e from upstream, Fix buffer offset for yuv422p
input. input.
(CVE-2024-32229, bsc#1227295) (CVE-2024-32229, bsc#1227295)
@@ -49,14 +230,14 @@ Tue Jul 5 14:18:52 UTC 2024 - Cliff Zhao <qzhao@suse.com>
Tue Jul 2 12:26:28 UTC 2024 - Cliff Zhao <qzhao@suse.com> Tue Jul 2 12:26:28 UTC 2024 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-CVE-2024-32230.patch: - Add ffmpeg-7-CVE-2024-32230.patch:
Backporting 96449cfe from upstream, Fix 1 line and one column images. Backport 96449cfe from upstream, Fix 1 line and one column images.
(CVE-2024-32230, bsc#1227296) (CVE-2024-32230, bsc#1227296)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 2 11:57:01 UTC 2024 - Cliff Zhao <qzhao@suse.com> Tue Jul 2 11:57:01 UTC 2024 - Cliff Zhao <qzhao@suse.com>
- Add ffmpeg-7-CVE-2024-32228.patch: - Add ffmpeg-7-CVE-2024-32228.patch:
Backporting 45964876 from upstream, Fix segfault on invalid film Backport 45964876 from upstream, Fix segfault on invalid film
grain metadata. grain metadata.
(CVE-2024-32228, bsc#1227277) (CVE-2024-32228, bsc#1227277)

View File

@@ -1,7 +1,7 @@
# #
# spec file for package ffmpeg-7 # spec file for package ffmpeg-7
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -60,11 +60,12 @@
%bcond_with fdk_aac_dlopen %bcond_with fdk_aac_dlopen
%bcond_with opencore %bcond_with opencore
%bcond_with smbclient %bcond_with smbclient
%bcond_with vvenc
%bcond_with x264 %bcond_with x264
%bcond_with x265 %bcond_with x265
%bcond_with xvid %bcond_with xvid
%if 0%{?suse_version} > 1500 %if 0%{?suse_version} > 1600
%bcond_without mysofa %bcond_without mysofa
%bcond_without vidstab %bcond_without vidstab
%bcond_without codec2 %bcond_without codec2
@@ -74,19 +75,29 @@
%bcond_without opencore %bcond_without opencore
%bcond_without xvid %bcond_without xvid
%else %else
%if 0%{?suse_version} > 1500
%bcond_without mysofa
%bcond_without vidstab
%bcond_without codec2
%bcond_without rubberband
%bcond_without vulkan
%bcond_without amrwb
%bcond_without opencore
%else
%bcond_with mysofa %bcond_with mysofa
%bcond_with vidstab %bcond_with vidstab
%bcond_with codec2 %bcond_with codec2
%bcond_with rubberband %bcond_with rubberband
%bcond_with vulkan %bcond_with vulkan
%endif %endif
%endif
%define _name ffmpeg %define _name ffmpeg
%define _major_version 7 %define _major_version 7
%define _major_expected 8 %define _major_expected 8
Name: ffmpeg-7 Name: ffmpeg-7
Version: 7.0.2 Version: 7.1.1
Release: 0 Release: 0
Summary: Set of libraries for working with various multimedia formats Summary: Set of libraries for working with various multimedia formats
License: GPL-3.0-or-later License: GPL-3.0-or-later
@@ -108,13 +119,15 @@ Patch3: ffmpeg-codec-choice.diff
Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch
Patch5: work-around-abi-break.patch Patch5: work-around-abi-break.patch
Patch10: ffmpeg-chromium.patch Patch10: ffmpeg-chromium.patch
Patch91: ffmpeg-dlopen-openh264.patch Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
Patch95: ffmpeg-7-fix-crashes.patch Patch18: ffmpeg-7-CVE-2025-25473.patch
Patch19: ffmpeg-7-CVE-2025-22921.patch
Patch20: 0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch
Patch21: ffmpeg-CVE-2025-7700.patch
BuildRequires: ladspa-devel BuildRequires: ladspa-devel
BuildRequires: libgsm-devel BuildRequires: libgsm-devel
BuildRequires: libmp3lame-devel >= 3.98.3
BuildRequires: nasm BuildRequires: nasm
BuildRequires: pkgconfig BuildRequires: pkg-config
BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(aom) >= 1.0.0 BuildRequires: pkgconfig(aom) >= 1.0.0
BuildRequires: pkgconfig(dav1d) >= 0.5.0 BuildRequires: pkgconfig(dav1d) >= 0.5.0
@@ -125,6 +138,7 @@ BuildRequires: pkgconfig(fribidi) >= 0.19.0
BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(gnutls)
BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(libass) >= 0.11.0 BuildRequires: pkgconfig(libass) >= 0.11.0
BuildRequires: pkgconfig(libavc1394)
BuildRequires: pkgconfig(libbluray) BuildRequires: pkgconfig(libbluray)
BuildRequires: pkgconfig(libbs2b) BuildRequires: pkgconfig(libbs2b)
BuildRequires: pkgconfig(libcdio) BuildRequires: pkgconfig(libcdio)
@@ -132,6 +146,8 @@ BuildRequires: pkgconfig(libcdio_paranoia)
BuildRequires: pkgconfig(libdc1394-2) BuildRequires: pkgconfig(libdc1394-2)
BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libgme) BuildRequires: pkgconfig(libgme)
BuildRequires: pkgconfig(libiec61883)
BuildRequires: pkgconfig(libmp3lame) >= 3.98.3
BuildRequires: pkgconfig(libopenjp2) >= 2.1.0 BuildRequires: pkgconfig(libopenjp2) >= 2.1.0
BuildRequires: pkgconfig(libopenmpt) >= 0.2.6557 BuildRequires: pkgconfig(libopenmpt) >= 0.2.6557
BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpng)
@@ -148,6 +164,7 @@ BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libzmq) >= 4.2.1 BuildRequires: pkgconfig(libzmq) >= 4.2.1
BuildRequires: pkgconfig(lilv-0) BuildRequires: pkgconfig(lilv-0)
BuildRequires: pkgconfig(ogg) BuildRequires: pkgconfig(ogg)
BuildRequires: pkgconfig(openh264)
BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(opus)
BuildRequires: pkgconfig(sdl2) >= 2.0.1 BuildRequires: pkgconfig(sdl2) >= 2.0.1
BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(soxr)
@@ -172,7 +189,7 @@ BuildRequires: pkgconfig(zvbi-0.2) >= 0.2.28
BuildRequires: AMF-devel BuildRequires: AMF-devel
%endif %endif
%if %{with mysofa} %if %{with mysofa}
BuildRequires: libmysofa-devel BuildRequires: pkgconfig(libmysofa)
%endif %endif
%if %{with codec2} %if %{with codec2}
BuildRequires: pkgconfig(codec2) BuildRequires: pkgconfig(codec2)
@@ -206,6 +223,9 @@ BuildRequires: pkgconfig(opencore-amrnb)
%if %{with amrwb} %if %{with amrwb}
BuildRequires: pkgconfig(vo-amrwbenc) BuildRequires: pkgconfig(vo-amrwbenc)
%endif %endif
%if %{with vvenc}
BuildRequires: vvenc-devel
%endif
%if %{with x264} %if %{with x264}
BuildRequires: pkgconfig(x264) BuildRequires: pkgconfig(x264)
%endif %endif
@@ -229,11 +249,7 @@ BuildRequires: pkgconfig(shaderc) >= 2019.1
BuildRequires: pkgconfig(vulkan) >= 1.3.255 BuildRequires: pkgconfig(vulkan) >= 1.3.255
%endif %endif
%if 0%{?suse_version} < 1550 && 0%{?sle_version} >= 150200 && 0%{?sle_version} < 150600 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
%ifarch x86_64 %x86_64
BuildRequires: pkgconfig(libmfx)
%endif
%else
%ifarch x86_64 %x86_64 %ifarch x86_64 %x86_64
BuildRequires: pkgconfig(vpl) >= 2.6 BuildRequires: pkgconfig(vpl) >= 2.6
%endif %endif
@@ -581,6 +597,7 @@ LDFLAGS="%_lto_cflags" \
--enable-libfreetype \ --enable-libfreetype \
--enable-libfribidi \ --enable-libfribidi \
--enable-libgsm \ --enable-libgsm \
--enable-libiec61883 \
--enable-libjack \ --enable-libjack \
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700
--enable-libjxl \ --enable-libjxl \
@@ -592,7 +609,7 @@ LDFLAGS="%_lto_cflags" \
%endif %endif
--enable-libopenjpeg \ --enable-libopenjpeg \
--enable-libopenmpt \ --enable-libopenmpt \
--enable-libopenh264-dlopen \ --enable-libopenh264 \
--enable-libopus \ --enable-libopus \
--enable-libpulse \ --enable-libpulse \
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400 %if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
@@ -630,11 +647,7 @@ LDFLAGS="%_lto_cflags" \
%endif %endif
%endif %endif
--enable-lv2 \ --enable-lv2 \
%if 0%{?suse_version} < 1550 && 0%{?sle_version} >= 150200 && 0%{?sle_version} < 150600 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
%ifarch x86_64 %x86_64
--enable-libmfx \
%endif
%else
%ifarch x86_64 %x86_64 %ifarch x86_64 %x86_64
--enable-libvpl \ --enable-libvpl \
%endif %endif
@@ -653,6 +666,9 @@ LDFLAGS="%_lto_cflags" \
%if %{with amrwb} %if %{with amrwb}
--enable-libvo-amrwbenc \ --enable-libvo-amrwbenc \
%endif %endif
%if %{with vvenc}
--enable-libvvenc \
%endif
%if %{with x264} %if %{with x264}
--enable-libx264 \ --enable-libx264 \
%endif %endif
@@ -805,8 +821,14 @@ done
%else %else
%define _name ffmpeg %define _name ffmpeg
# Patches may subtly change internal APIs, so we're sticking %%release in
# Requires lines. It also conveniently blocks openSUSE libav* being combined
# with Packman libav*, due to PM's unique %%release numbers.
# This use of %%release with %flavor however requires bcnt synchro:
#
#!BcntSyncTag: ffmpeg-7
Name: ffmpeg-7-mini Name: ffmpeg-7-mini
Version: 7.0 Version: 7.1.1
Release: 0 Release: 0
Summary: Set of libraries for working with various multimedia formats Summary: Set of libraries for working with various multimedia formats
License: GPL-3.0-or-later License: GPL-3.0-or-later
@@ -821,12 +843,9 @@ Patch3: ffmpeg-codec-choice.diff
Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch
Patch5: work-around-abi-break.patch Patch5: work-around-abi-break.patch
Patch10: ffmpeg-chromium.patch Patch10: ffmpeg-chromium.patch
Patch91: ffmpeg-dlopen-openh264.patch Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
Patch92: ffmpeg-7-CVE-2024-32228.patch
Patch93: ffmpeg-7-CVE-2024-32230.patch
Patch94: ffmpeg-7-CVE-2024-32229.patch
Patch95: ffmpeg-7-fix-crashes.patch
BuildRequires: c_compiler BuildRequires: c_compiler
BuildRequires: pkgconfig(openh264)
Requires: this-is-only-for-build-envs Requires: this-is-only-for-build-envs
%description %description

View File

@@ -0,0 +1,45 @@
From 35a6de137a39f274d5e01ed0e0e6c4f04d0aaf07 Mon Sep 17 00:00:00 2001
From: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Date: Thu, 10 Jul 2025 16:26:39 +0000
Subject: [PATCH] libavcodec/alsdec.c: Add check for av_malloc_array() and
av_calloc()
Add check for the return value of av_malloc_array() and av_calloc()
to avoid potential NULL pointer dereference.
Fixes: dcfd24b10c ("avcodec/alsdec: Implement floating point sample data decoding")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/alsdec.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 734eec8bf8..97b04a95f9 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -2119,8 +2119,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
ctx->nbits = av_malloc_array(ctx->cur_frame_length, sizeof(*ctx->nbits));
ctx->mlz = av_mallocz(sizeof(*ctx->mlz));
- if (!ctx->mlz || !ctx->acf || !ctx->shift_value || !ctx->last_shift_value
- || !ctx->last_acf_mantissa || !ctx->raw_mantissa) {
+ if (!ctx->larray || !ctx->nbits || !ctx->mlz || !ctx->acf || !ctx->shift_value
+ || !ctx->last_shift_value || !ctx->last_acf_mantissa || !ctx->raw_mantissa) {
av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
return AVERROR(ENOMEM);
}
@@ -2132,6 +2132,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
for (c = 0; c < channels; ++c) {
ctx->raw_mantissa[c] = av_calloc(ctx->cur_frame_length, sizeof(**ctx->raw_mantissa));
+ if (!ctx->raw_mantissa[c]) {
+ av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
+ return AVERROR(ENOMEM);
+ }
}
}
--
2.25.1

View File

@@ -11,11 +11,11 @@ Add av_stream_get_first_dts for Chromium
libavformat/utils.c | 7 +++++++ libavformat/utils.c | 7 +++++++
2 files changed, 11 insertions(+) 2 files changed, 11 insertions(+)
Index: ffmpeg-7.0/libavformat/avformat.h Index: ffmpeg-7.1/libavformat/avformat.h
=================================================================== ===================================================================
--- ffmpeg-7.0.orig/libavformat/avformat.h --- ffmpeg-7.1.orig/libavformat/avformat.h
+++ ffmpeg-7.0/libavformat/avformat.h +++ ffmpeg-7.1/libavformat/avformat.h
@@ -1170,6 +1170,10 @@ typedef struct AVStreamGroup { @@ -1202,6 +1202,10 @@ typedef struct AVStreamGroup {
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
@@ -26,13 +26,13 @@ Index: ffmpeg-7.0/libavformat/avformat.h
#define AV_PROGRAM_RUNNING 1 #define AV_PROGRAM_RUNNING 1
/** /**
Index: ffmpeg-7.0/libavformat/utils.c Index: ffmpeg-7.1/libavformat/utils.c
=================================================================== ===================================================================
--- ffmpeg-7.0.orig/libavformat/utils.c --- ffmpeg-7.1.orig/libavformat/utils.c
+++ ffmpeg-7.0/libavformat/utils.c +++ ffmpeg-7.1/libavformat/utils.c
@@ -56,6 +56,13 @@ int ff_unlock_avformat(void) @@ -44,6 +44,13 @@
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0; * various utility functions for use within FFmpeg
} */
+// Chromium: We use the internal field first_dts vvv +// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st) +int64_t av_stream_get_first_dts(const AVStream *st)

View File

@@ -1,354 +0,0 @@
From 4739b0c97b3378bdaf737171777fe9a71a53eff1 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 | 8 ++
libavcodec/libopenh264enc.c | 8 ++
7 files changed, 230 insertions(+)
create mode 100644 libavcodec/libopenh264_dlopen.c
create mode 100644 libavcodec/libopenh264_dlopen.h
Index: ffmpeg-7.0/configure
===================================================================
--- ffmpeg-7.0.orig/configure
+++ ffmpeg-7.0/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]
+ --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
@@ -1933,6 +1934,7 @@ EXTERNAL_LIBRARY_LIST="
libmysofa
libopencv
libopenh264
+ libopenh264_dlopen
libopenjpeg
libopenmpt
libopenvino
@@ -6921,6 +6923,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 >= 1.3.0" 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++"
Index: ffmpeg-7.0/libavcodec/Makefile
===================================================================
--- ffmpeg-7.0.orig/libavcodec/Makefile
+++ ffmpeg-7.0/libavcodec/Makefile
@@ -1128,6 +1128,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
+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_ENCODER) += libopenjpegenc.o
Index: ffmpeg-7.0/libavcodec/libopenh264.c
===================================================================
--- ffmpeg-7.0.orig/libavcodec/libopenh264.c
+++ ffmpeg-7.0/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"
Index: ffmpeg-7.0/libavcodec/libopenh264_dlopen.c
===================================================================
--- /dev/null
+++ ffmpeg-7.0/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;
+}
Index: ffmpeg-7.0/libavcodec/libopenh264_dlopen.h
===================================================================
--- /dev/null
+++ ffmpeg-7.0/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 */
Index: ffmpeg-7.0/libavcodec/libopenh264dec.c
===================================================================
--- ffmpeg-7.0.orig/libavcodec/libopenh264dec.c
+++ ffmpeg-7.0/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,10 @@ static av_cold int svc_decode_init(AVCod
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;
Index: ffmpeg-7.0/libavcodec/libopenh264enc.c
===================================================================
--- ffmpeg-7.0.orig/libavcodec/libopenh264enc.c
+++ ffmpeg-7.0/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,10 @@ static av_cold int svc_encode_init(AVCod
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;

View File

@@ -13,11 +13,12 @@ ffmpeg, which can cause inadvertent mixing of library versions on
openSUSE, and precompiled Linux distributions in general. openSUSE, and precompiled Linux distributions in general.
Upstream says "we only add new functions" - which is ok in its own Upstream says "we only add new functions" - which is ok in its own
right. verdefs, if you have them, *must*not* change under any right. New symbols must be in a new verdef section though, existing
circumstances, but that is what they broke: the set of symbols sections *must*not* change under *any* circumstances, but that is
included in the "LIBAVFORMAT_59" verdef changed between 5.0 and 5.1. 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 $ 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 Functions changes summary: 0 Removed, 0 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 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 Function symbols changes summary: 0 Removed, 1 Added function symbol not referenced by debug info
@@ -37,10 +38,10 @@ releases.
ffbuild/library.mak | 2 +- ffbuild/library.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
Index: ffmpeg-5.1/ffbuild/library.mak Index: ffmpeg-7.1/ffbuild/library.mak
=================================================================== ===================================================================
--- ffmpeg-5.1.orig/ffbuild/library.mak --- ffmpeg-7.1.orig/ffbuild/library.mak
+++ ffmpeg-5.1/ffbuild/library.mak +++ ffmpeg-7.1/ffbuild/library.mak
@@ -59,7 +59,7 @@ $(SUBDIR)lib$(FULLNAME).pc: $(SUBDIR)ver @@ -59,7 +59,7 @@ $(SUBDIR)lib$(FULLNAME).pc: $(SUBDIR)ver
$$(M) $$(SRC_PATH)/ffbuild/pkgconfig_generate.sh $(NAME) "$(DESC)" $$(M) $$(SRC_PATH)/ffbuild/pkgconfig_generate.sh $(NAME) "$(DESC)"