diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..05a0e946187b8160d0c54c23a9f8100f44e0f43b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.xz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..bd47c9b929ecc99a63ece0acf700e3275767a9ad --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/ffmpeg diff --git a/CVE-2023-49501.patch b/CVE-2023-49501.patch deleted file mode 100644 index 72fef656e758e612555e434b021068f9d84a657a..0000000000000000000000000000000000000000 --- a/CVE-2023-49501.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b45cc9297e567f76ccd39d9670eed521f2036d2c Mon Sep 17 00:00:00 2001 -From: happyworker <208suo@208suo.com> -Date: Wed, 18 Sep 2024 15:24:00 +0800 -Subject: [PATCH] createpatch - ---- - libavfilter/asrc_afirsrc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavfilter/asrc_afirsrc.c b/libavfilter/asrc_afirsrc.c -index e2359c1..ea04c35 100644 ---- a/libavfilter/asrc_afirsrc.c -+++ b/libavfilter/asrc_afirsrc.c -@@ -480,7 +480,7 @@ static av_cold int config_eq_output(AVFilterLink *outlink) - if (ret < 0) - return ret; - -- s->magnitude = av_calloc(s->nb_magnitude, sizeof(*s->magnitude)); -+ s->magnitude = av_calloc(s->nb_magnitude + 1, sizeof(*s->magnitude)); - if (!s->magnitude) - return AVERROR(ENOMEM); - memcpy(s->magnitude, eq_presets[s->preset].gains, sizeof(*s->magnitude) * s->nb_magnitude); --- -2.27.0 - diff --git a/CVE-2023-49528.patch b/CVE-2023-49528.patch deleted file mode 100644 index a71f55c63a67dc065d09cd571f74a2cf2dbc369f..0000000000000000000000000000000000000000 --- a/CVE-2023-49528.patch +++ /dev/null @@ -1,57 +0,0 @@ -From ffae3ca84f646530fe9236b0966b663aebb06717 Mon Sep 17 00:00:00 2001 -From: Paul B Mahol -Date: Thu, 6 Jun 2024 17:45:43 +0800 -Subject: [PATCH] Fix CVE-2023-49528 - -Conflict:NA -Reference:2d9ed64859c9887d0504cd71dbd5b2c15e14251a ---- - libavfilter/af_dialoguenhance.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/libavfilter/af_dialoguenhance.c b/libavfilter/af_dialoguenhance.c -index 1762ea7..0924c3e 100644 ---- a/libavfilter/af_dialoguenhance.c -+++ b/libavfilter/af_dialoguenhance.c -@@ -96,12 +96,13 @@ static int config_input(AVFilterLink *inlink) - if (!s->window) - return AVERROR(ENOMEM); - -- s->in_frame = ff_get_audio_buffer(inlink, s->fft_size * 4); -- s->center_frame = ff_get_audio_buffer(inlink, s->fft_size * 4); -- s->out_dist_frame = ff_get_audio_buffer(inlink, s->fft_size * 4); -- s->windowed_frame = ff_get_audio_buffer(inlink, s->fft_size * 4); -- s->windowed_out = ff_get_audio_buffer(inlink, s->fft_size * 4); -- s->windowed_prev = ff_get_audio_buffer(inlink, s->fft_size * 4); -+ s->in_frame = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); -+ s->center_frame = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); -+ s->out_dist_frame = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); -+ s->windowed_frame = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); -+ s->windowed_out = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); -+ s->windowed_prev = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); -+ - if (!s->in_frame || !s->windowed_out || !s->windowed_prev || - !s->out_dist_frame || !s->windowed_frame || !s->center_frame) - return AVERROR(ENOMEM); -@@ -250,6 +251,7 @@ static int de_stereo(AVFilterContext *ctx, AVFrame *out) - float *right_osamples = (float *)out->extended_data[1]; - float *center_osamples = (float *)out->extended_data[2]; - const int offset = s->fft_size - s->overlap; -+ const int nb_samples = FFMIN(s->overlap, s->in->nb_samples); - float vad; - - // shift in/out buffers -@@ -258,8 +260,8 @@ static int de_stereo(AVFilterContext *ctx, AVFrame *out) - memmove(left_out, &left_out[s->overlap], offset * sizeof(float)); - memmove(right_out, &right_out[s->overlap], offset * sizeof(float)); - -- memcpy(&left_in[offset], left_samples, s->overlap * sizeof(float)); -- memcpy(&right_in[offset], right_samples, s->overlap * sizeof(float)); -+ memcpy(&left_in[offset], left_samples, nb_samples * sizeof(float)); -+ memcpy(&right_in[offset], right_samples, nb_samples * sizeof(float)); - memset(&left_out[offset], 0, s->overlap * sizeof(float)); - memset(&right_out[offset], 0, s->overlap * sizeof(float)); - --- -2.33.0 - diff --git a/CVE-2024-7055.patch b/CVE-2024-7055.patch deleted file mode 100644 index 84dda1441b91698b53690e75d7f7b244dce0e0ba..0000000000000000000000000000000000000000 --- a/CVE-2024-7055.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d911cb96e55228619a29704dda26d2fddd6779f6 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer -Date: Tue, 27 Aug 2024 10:14:04 +0800 -Subject: [PATCH] avcodec/pnmdec: Use 64bit for input size check - ---- - libavcodec/pnmdec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c -index acd77ea..40cc2ae 100644 ---- a/libavcodec/pnmdec.c -+++ b/libavcodec/pnmdec.c -@@ -264,7 +264,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, - break; - case AV_PIX_FMT_GBRPF32: - if (!s->half) { -- if (avctx->width * avctx->height * 12 > s->bytestream_end - s->bytestream) -+ if (avctx->width * avctx->height * 12LL > s->bytestream_end - s->bytestream) - return AVERROR_INVALIDDATA; - scale = 1.f / s->scale; - if (s->endian) { --- -2.27.0 - diff --git a/avformat-get_first_dts.patch b/avformat-get_first_dts.patch deleted file mode 100644 index cabb6b85730dd63679be6df9ab3c4996287cd5f0..0000000000000000000000000000000000000000 --- a/avformat-get_first_dts.patch +++ /dev/null @@ -1,46 +0,0 @@ -commit 95aab0fd83619408995720ce53d7a74790580220 -author liberato@chromium.org Thu Jul 08 02:01:22 2021 -committer liberato@chromium.org Thu Jul 08 02:01:22 2021 -tree ac725b5e2c548c8142aa7096d8184d87d3876a49 -parent e073b7a22e4993e0a7cab80a42a21524e5349f95 - -Add av_stream_get_first_dts for Chromium - ---- - libavformat/avformat.h | 4 ++++ - libavformat/utils.c | 7 +++++++ - 2 files changed, 11 insertions(+) - -Index: ffmpeg-6.1.1/libavformat/avformat.h -=================================================================== ---- ffmpeg-6.1.1.orig/libavformat/avformat.h -+++ ffmpeg-6.1.1/libavformat/avformat.h -@@ -1030,6 +1030,10 @@ attribute_deprecated - int64_t av_stream_get_end_pts(const AVStream *st); - #endif - -+// 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 - - /** -Index: ffmpeg-6.1.1/libavformat/utils.c -=================================================================== ---- ffmpeg-6.1.1.orig/libavformat/utils.c -+++ ffmpeg-6.1.1/libavformat/utils.c -@@ -56,6 +56,13 @@ int ff_unlock_avformat(void) - return ff_mutex_unlock(&avformat_mutex) ? -1 : 0; - } - -+// Chromium: We use the internal field first_dts vvv -+int64_t av_stream_get_first_dts(const AVStream *st) -+{ -+ 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) - diff --git a/backport-CVE-2024-35366.patch b/backport-CVE-2024-35366.patch deleted file mode 100644 index f98ae9b69aa6048331e9c34d3074e73f7c79786e..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-35366.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0bed22d597b78999151e3bde0768b7fe763fc2a6 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer -Date: Tue, 26 Mar 2024 00:39:49 +0100 -Subject: [PATCH] avformat/sbgdec: Check for negative duration - -Fixes: signed integer overflow: 9223372036854775807 - -8000000 cannot be represented in type 'long' -Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-5133181743136768 - -Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg -Signed-off-by: Michael Niedermayer ---- - libavformat/sbgdec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c -index bc2469afd1..e60eb1481e 100644 ---- a/libavformat/sbgdec.c -+++ b/libavformat/sbgdec.c -@@ -387,7 +387,7 @@ static int parse_options(struct sbg_parser *p) - case 'L': - FORWARD_ERROR(parse_optarg(p, opt, &oarg)); - r = str_to_time(oarg.s, &p->scs.opt_duration); -- if (oarg.e != oarg.s + r) { -+ if (oarg.e != oarg.s + r || p->scs.opt_duration < 0) { - snprintf(p->err_msg, sizeof(p->err_msg), - "syntax error for option -L"); - return AVERROR_INVALIDDATA; --- -2.33.0 diff --git a/backport-CVE-2024-35367.patch b/backport-CVE-2024-35367.patch deleted file mode 100644 index e549cc037845d54d04bbd007f236da7c5fb3f197..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-35367.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 09e6840cf7a3ee07a73c3ae88a020bf27ca1a667 Mon Sep 17 00:00:00 2001 -From: Andreas Rheinhardt -Date: Wed, 13 Mar 2024 02:10:26 +0100 -Subject: [PATCH] avcodec/ppc/vp8dsp_altivec: Fix out-of-bounds access - -h_subpel_filters_inner[i] and h_subpel_filters_outer[i / 2] -belong together and the former allows the range 0..6, -so the latter needs to support 0..3. But it has only three -elements. Add another one. -The value for the last element has been guesstimated -from subpel_filters in libavcodec/vp8dsp.c. - -This is also intended to fix FATE-failures with UBSan here: -https://fate.ffmpeg.org/report.cgi?time=20240312011016&slot=ppc-linux-gcc-13.2-ubsan-altivec-qemu - -Tested-by: Sean McGovern -Signed-off-by: Andreas Rheinhardt ---- - libavcodec/ppc/vp8dsp_altivec.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c -index 12dac8b0a8..061914fc38 100644 ---- a/libavcodec/ppc/vp8dsp_altivec.c -+++ b/libavcodec/ppc/vp8dsp_altivec.c -@@ -50,11 +50,12 @@ static const vec_s8 h_subpel_filters_inner[7] = - // for 6tap filters, these are the outer two taps - // The zeros mask off pixels 4-7 when filtering 0-3 - // and vice-versa --static const vec_s8 h_subpel_filters_outer[3] = -+static const vec_s8 h_subpel_filters_outer[4] = - { - REPT4(0, 0, 2, 1), - REPT4(0, 0, 3, 3), - REPT4(0, 0, 1, 2), -+ REPT4(0, 0, 0, 0), - }; - - #define LOAD_H_SUBPEL_FILTER(i) \ --- -2.33.0 diff --git a/backport-CVE-2024-35368.patch b/backport-CVE-2024-35368.patch deleted file mode 100644 index cce8aa4c1ebd7786c26e8aa7a40b83e9b66b2766..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-35368.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4513300989502090c4fd6560544dce399a8cd53c Mon Sep 17 00:00:00 2001 -From: Andreas Rheinhardt -Date: Sun, 24 Sep 2023 13:15:48 +0200 -Subject: [PATCH] avcodec/rkmppdec: Fix double-free on error - -After having created the AVBuffer that is put into frame->buf[0], -ownership of several objects (namely an AVDRMFrameDescriptor, -an MppFrame and some AVBufferRefs framecontextref and decoder_ref) -has passed to the AVBuffer and therefore to the frame. -Yet it has nevertheless been freed manually on error -afterwards, which would lead to a double-free as soon -as the AVFrame is unreferenced. - -Signed-off-by: Andreas Rheinhardt ---- - libavcodec/rkmppdec.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c -index 7665098c6a..6889545b20 100644 ---- a/libavcodec/rkmppdec.c -+++ b/libavcodec/rkmppdec.c -@@ -463,8 +463,8 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame) - - frame->hw_frames_ctx = av_buffer_ref(decoder->frames_ref); - if (!frame->hw_frames_ctx) { -- ret = AVERROR(ENOMEM); -- goto fail; -+ av_frame_unref(frame); -+ return AVERROR(ENOMEM); - } - - return 0; --- -2.33.0 diff --git a/backport-CVE-2024-35369.patch b/backport-CVE-2024-35369.patch deleted file mode 100644 index 3feb3c8abd2e27b898384e3b14e2e1a363167e8b..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-35369.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0895ef0d6d6406ee6cd158fc4d47d80f201b8e9c Mon Sep 17 00:00:00 2001 -From: James Almer -Date: Sat, 17 Feb 2024 09:45:57 -0300 -Subject: [PATCH] avcodec/speexdec: further check for sane frame_size values - -Prevent potential integer overflows. - -Signed-off-by: James Almer ---- - libavcodec/speexdec.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/libavcodec/speexdec.c b/libavcodec/speexdec.c -index 08c7e77..46d2587 100644 ---- a/libavcodec/speexdec.c -+++ b/libavcodec/speexdec.c -@@ -1420,8 +1420,10 @@ static int parse_speex_extradata(AVCodecContext *avctx, - return AVERROR_INVALIDDATA; - s->bitrate = bytestream_get_le32(&buf); - s->frame_size = bytestream_get_le32(&buf); -- if (s->frame_size < NB_FRAME_SIZE << s->mode) -+ if (s->frame_size < NB_FRAME_SIZE << s->mode || -+ s->frame_size > INT32_MAX >> s->mode) - return AVERROR_INVALIDDATA; -+ s->frame_size <<= s->mode; - s->vbr = bytestream_get_le32(&buf); - s->frames_per_packet = bytestream_get_le32(&buf); - if (s->frames_per_packet <= 0 || --- -2.33.0 - diff --git a/backport-CVE-2024-36613.patch b/backport-CVE-2024-36613.patch deleted file mode 100644 index c67da5bc80daea2e49ce57a059ceb7c70aae1e78..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-36613.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1f6fcc64179377114b4ecc3b9f63bd5774a64edf Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer -Date: Sat, 30 Sep 2023 00:51:29 +0200 -Subject: [PATCH] avformat/dxa: Adjust order of operations around block -align - -Fixes: -51896/clusterfuzz-testcase-minimized-ffmpeg_dem_DXA_fuzzer-5730576523198464 -Fixes: signed integer overflow: 2147483566 + 82 cannot be represented in -type 'int' - -Found-by: continuous fuzzing process -https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg -Signed-off-by: Michael Niedermayer -(cherry picked from commit 50d8e4f27398fd5778485a827d7a2817921f8540) -Signed-off-by: Michael Niedermayer ---- - libavformat/dxa.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavformat/dxa.c b/libavformat/dxa.c -index 474b852..167241f 100644 ---- a/libavformat/dxa.c -+++ b/libavformat/dxa.c -@@ -122,7 +122,7 @@ static int dxa_read_header(AVFormatContext *s) - if(ast->codecpar->block_align) { - if (c->bpc > INT_MAX - ast->codecpar->block_align + 1) - return AVERROR_INVALIDDATA; -- c->bpc = ((c->bpc + ast->codecpar->block_align - 1) / ast->codecpar->block_align) * ast->codecpar->block_align; -+ c->bpc = ((c->bpc - 1 + ast->codecpar->block_align) / ast->codecpar->block_align) * ast->codecpar->block_align; - } - c->bytes_left = fsize; - c->wavpos = avio_tell(pb); --- -2.46.0 - diff --git a/backport-CVE-2024-36616.patch b/backport-CVE-2024-36616.patch deleted file mode 100644 index 6668a083ad8b3fc9376f24234ca25ddb913df3fe..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-36616.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 86f73277bf014e2ce36dd2594f1e0fb8b3bd6661 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer -Date: Tue, 26 Mar 2024 01:00:13 +0100 -Subject: [PATCH] avformat/westwood_vqa: Fix 2g packets - -Fixes: signed integer overflow: 2147483424 * 2 cannot be represented in type 'int' -Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-4576211411795968 - -Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg -Signed-off-by: Michael Niedermayer ---- - libavformat/westwood_vqa.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c -index 954710a6f0..3a31e3f5e8 100644 ---- a/libavformat/westwood_vqa.c -+++ b/libavformat/westwood_vqa.c -@@ -262,7 +262,7 @@ static int wsvqa_read_packet(AVFormatContext *s, - break; - case SND2_TAG: - /* 2 samples/byte, 1 or 2 samples per frame depending on stereo */ -- pkt->duration = (chunk_size * 2) / wsvqa->channels; -+ pkt->duration = (chunk_size * 2LL) / wsvqa->channels; - break; - } - break; --- -2.33.0 diff --git a/backport-CVE-2024-36617.patch b/backport-CVE-2024-36617.patch deleted file mode 100644 index 81696260aa88c746acbe3e31e7ac116a142822e0..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-36617.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d973fcbcc2f944752ff10e6a76b0b2d9329937a7 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer -Date: Sat, 30 Sep 2023 00:38:17 +0200 -Subject: [PATCH] avformat/cafdec: dont seek beyond 64bit - -Fixes: signed integer overflow: 64 + 9223372036854775807 cannot be represented in type 'long long' -Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6418242730328064 -Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6418242730328064 - -Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg -Signed-off-by: Michael Niedermayer ---- - libavformat/cafdec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c -index 426c56b9bd..72809fd1de 100644 ---- a/libavformat/cafdec.c -+++ b/libavformat/cafdec.c -@@ -271,7 +271,7 @@ static int read_pakt_chunk(AVFormatContext *s, int64_t size) - } - } - -- if (avio_tell(pb) - ccount > size) { -+ if (avio_tell(pb) - ccount > size || size > INT64_MAX - ccount) { - av_log(s, AV_LOG_ERROR, "error reading packet table\n"); - return AVERROR_INVALIDDATA; - } --- -2.43.0 - diff --git a/backport-CVE-2024-36618.patch b/backport-CVE-2024-36618.patch deleted file mode 100644 index 9bbcd2e237888ef82ee9d66ffb328aa763eb4b70..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-36618.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7a089ed8e049e3bfcb22de1250b86f2106060857 Mon Sep 17 00:00:00 2001 -From: Andreas Rheinhardt -Date: Tue, 12 Mar 2024 23:23:17 +0100 -Subject: [PATCH] avformat/avidec: Fix integer overflow iff ULONG_MAX < - INT64_MAX - -Affects many FATE-tests, see -https://fate.ffmpeg.org/report.cgi?time=20240312011016&slot=ppc-linux-gcc-13.2-ubsan-altivec-qemu - -Reviewed-by: James Almer -Signed-off-by: Andreas Rheinhardt ---- - libavformat/avidec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavformat/avidec.c b/libavformat/avidec.c -index f3183b2698..985a9bf022 100644 ---- a/libavformat/avidec.c -+++ b/libavformat/avidec.c -@@ -1696,7 +1696,7 @@ static int check_stream_max_drift(AVFormatContext *s) - int *idx = av_calloc(s->nb_streams, sizeof(*idx)); - if (!idx) - return AVERROR(ENOMEM); -- for (min_pos = pos = 0; min_pos != INT64_MAX; pos = min_pos + 1LU) { -+ for (min_pos = pos = 0; min_pos != INT64_MAX; pos = min_pos + 1ULL) { - int64_t max_dts = INT64_MIN / 2; - int64_t min_dts = INT64_MAX / 2; - int64_t max_buffer = 0; --- -2.43.0 - diff --git a/backport-CVE-2024-36619.patch b/backport-CVE-2024-36619.patch deleted file mode 100644 index c18b7c408c10ddccd2a00ed211356a8df4840103..0000000000000000000000000000000000000000 --- a/backport-CVE-2024-36619.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 28c7094b25b689185155a6833caf2747b94774a4 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer -Date: Thu, 4 Apr 2024 00:15:27 +0200 -Subject: [PATCH] avcodec/wavarc: fix signed integer overflow in block type - 6/19 - -Fixes: signed integer overflow: -2088796289 + -91276551 cannot be represented in type 'int' -Fixes: 67772/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-6533568953122816 - -Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg -Signed-off-by: Michael Niedermayer ---- - libavcodec/wavarc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavcodec/wavarc.c b/libavcodec/wavarc.c -index 7083494cd8..b4b26958e6 100644 ---- a/libavcodec/wavarc.c -+++ b/libavcodec/wavarc.c -@@ -647,7 +647,7 @@ static int decode_5elp(AVCodecContext *avctx, - for (int o = 0; o < order; o++) - sum += s->filter[ch][o] * (unsigned)samples[n + 70 - o - 1]; - -- samples[n + 70] += ac_out[n] + (sum >> 4); -+ samples[n + 70] += ac_out[n] + (unsigned)(sum >> 4); - } - - for (int n = 0; n < 70; n++) --- -2.33.0 - diff --git a/ffmpeg-6.1.1.tar.xz b/ffmpeg-7.0.2.tar.xz similarity index 55% rename from ffmpeg-6.1.1.tar.xz rename to ffmpeg-7.0.2.tar.xz index 3c4a2a241e2ac2b89b177463ec634af90e130612..9eecbe7507959259b5b0ec4f30cc02b0d92ab5d1 100644 Binary files a/ffmpeg-6.1.1.tar.xz and b/ffmpeg-7.0.2.tar.xz differ diff --git a/ffmpeg.spec b/ffmpeg.spec index 56fd6fdad1cfde0859b2832a35a91985561bd085..20b81ba9037e0567916de4dab56456eac36f745b 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -45,51 +45,39 @@ %global _with_mmal 1 %endif -%if 0%{?_without_gpl} -%global lesser L +%if 0%{?_without_gpl}%global lesser L %endif %if 0%{!?_without_amr} || 0%{?_with_gmp} || 0%{?_with_smb} %global ffmpeg_license %{?lesser}GPLv3+ -%else +lse %global ffmpeg_license %{?lesser}GPLv2+ %endif + %if "%{?toolchain}" == "clang" -%bcond compiler_clang 1 +%bcond_without compiler_clang +%endif + +# Fails due to asm issue +%ifarch %{ix86} +%bcond_with lto +%else +%bcond_without lto +%endif + +%if %{without lto} +%global _lto_cflags %{nil} %endif Summary: Digital VCR and streaming server Name: ffmpeg%{?flavor} -Version: 6.1.1 -Release: 23 +Version: 7.0.2 +Release: 2%{?dist} License: GPL-3.0-or-later -URL: http://ffmpeg.org/ -Source0: http://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz -# Special patch for building chromium -Patch0: avformat-get_first_dts.patch -Patch1: fix-CVE-2023-50007.patch -Patch2: fix-CVE-2023-50008.patch -Patch3: fix-CVE-2024-31578.patch -Patch4: fix-CVE-2024-31582.patch -Patch5: fix_libsvgdec_compile_error.patch -Patch6: CVE-2023-49528.patch -Patch7: fix-CVE-2023-49502.patch -Patch8: fix-CVE-2024-32230.patch -Patch9: CVE-2024-7055.patch -Patch10: CVE-2023-49501.patch -Patch11: backport-CVE-2024-35366.patch -Patch12: backport-CVE-2024-35367.patch -Patch13: backport-CVE-2024-35368.patch -Patch14: backport-CVE-2024-36616.patch -Patch15: backport-CVE-2024-36618.patch -Patch16: backport-CVE-2024-36617.patch -Patch17: backport-CVE-2024-36619.patch -Patch18: backport-CVE-2024-35369.patch -Patch19: backport-CVE-2024-36613.patch -Patch20: CVE-2025-25473.patch -Patch21: backport-CVE-2024-35365.patch -Patch22: fix-CVE-2025-22919-CVE-2025-22921.patch +URL: https://ffmpeg.org/ +Source0: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz + Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-drivers-devel} @@ -118,7 +106,6 @@ BuildRequires: lame-devel >= 3.98.3 %{?_with_caca:BuildRequires: libcaca-devel} %{!?_without_cdio:BuildRequires: libcdio-paranoia-devel} %{?_with_chromaprint:BuildRequires: libchromaprint-devel} -%{?_with_crystalhd:BuildRequires: libcrystalhd-devel} %if 0%{?_with_ieee1394} BuildRequires: libavc1394-devel BuildRequires: libdc1394-devel @@ -197,7 +184,7 @@ This package contains the libraries for %{name} %package -n libavdevice%{?flavor} Summary: Special devices muxing/demuxing library Requires: %{name}-libs%{_isa} = %{version}-%{release} -Requires: jack-audio-connection-kit +Requires: jack-audio-connection-kit %description -n libavdevice%{?flavor} Libavdevice is a complementary library to libavf "libavformat". It provides @@ -208,7 +195,6 @@ devices, audio capture and playback etc. Summary: Development package for %{name} Requires: %{name}-libs%{_isa} = %{version}-%{release} Requires: libavdevice%{?flavor}%{_isa} = %{version}-%{release} -Requires: pkgconfig %description devel FFmpeg is a complete and free Internet live audio and video @@ -237,7 +223,6 @@ This package contains development files for %{name} %{!?_without_amr:--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3} \\\ --enable-bzlib \\\ %{?_with_chromaprint:--enable-chromaprint} \\\ - %{!?_with_crystalhd:--disable-crystalhd} \\\ --enable-fontconfig \\\ %{!?_without_frei0r:--enable-frei0r} \\\ --enable-gcrypt \\\ @@ -301,6 +286,7 @@ This package contains development files for %{name} --enable-libzimg \\\ %{?_with_zmq:--enable-libzmq} \\\ %{!?_without_zvbi:--enable-libzvbi} \\\ + %{!?_without_lto:--enable-lto} \\\ --enable-avfilter \\\ --enable-libmodplug \\\ --enable-postproc \\\ @@ -369,8 +355,8 @@ cp -pr doc/examples/{*.c,Makefile,README} _doc/examples/ || cat ffbuild/config.log %make_build V=1 -make documentation V=1 -make alltools V=1 +%make_build documentation V=1 +%make_build alltools V=1 %install %make_install V=1 @@ -381,9 +367,6 @@ rm -r %{buildroot}%{_datadir}/%{name}/examples install -pm755 tools/qt-faststart %{buildroot}%{_bindir} %endif -%ldconfig_scriptlets libs -%ldconfig_scriptlets -n libavdevice%{?flavor} - %if 0%{!?_without_tools:1} %files %{_bindir}/ffmpeg%{?progs_suffix} @@ -420,9 +403,14 @@ install -pm755 tools/qt-faststart %{buildroot}%{_bindir} %{_libdir}/pkgconfig/lib*.pc %{_libdir}/lib*.so - %changelog -* Tue Jul 2025 happyworker <208suo@208suo.com> - 6.1.1-23 +* Tue Sep 09 2025 jinsunrui - 7.0.2-2 +- Fix spec file formatting (replace tabs with spaces) to pass check_spec_file.This major version update from upstream causes expected ABI and requires changes,which result in rpm_abi and rpm_requires check failures. Dependent packages may need recompilation. + +* Mon Sep 08 2025 jinsunrui - 7.0.2-1 +- Upgrade the support version of ffmpeg on the Shenwei platform to 7.0.2, as the new version fixes the previous vulnerability and removes the previous patch packages. + +* Tue Jul 15 2025 happyworker <208suo@208suo.com> - 6.1.1-23 - fix CVE-2025-22919-CVE-2025-22921 * Tue Apr 22 2025 changtao - 6.1.1-22 @@ -496,7 +484,7 @@ install -pm755 tools/qt-faststart %{buildroot}%{_bindir} * Wed Feb 21 2024 Dongxing Wang - 4.4.4-2 - Fix obs failure -* Wed Nov 27 2023 Jingwiw - 4.4.4-1 +* Mon Nov 27 2023 Jingwiw - 4.4.4-1 - Upgrade to 4.4.4 * Tue Nov 14 2023 ouuleilei - 4.2.9-1 diff --git a/ffmpeg.yaml b/ffmpeg.yaml new file mode 100644 index 0000000000000000000000000000000000000000..287bbbadb1a6a2a649130366f2608f5589e637b6 --- /dev/null +++ b/ffmpeg.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://git.ffmpeg.org/ffmpeg.git +tag_prefix: "^n" +separator: "." diff --git a/fix-CVE-2023-49502.patch b/fix-CVE-2023-49502.patch deleted file mode 100644 index 5e2ab4239ae724b932ce6823fdd0f6d2027a4043..0000000000000000000000000000000000000000 --- a/fix-CVE-2023-49502.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 1b6c65ed990c7bdfe298ff6832da55bdc823e0c1 Mon Sep 17 00:00:00 2001 -From: happyworker -Date: Tue, 18 Jun 2024 18:03:52 +0800 -Subject: [PATCH] fix-CVE-2023-49502 - ---- - libavfilter/vf_bwdif.c | 9 +++++---- - libavfilter/vf_bwdif_cuda.c | 11 ++++++----- - libavfilter/vf_bwdif_vulkan.c | 9 ++++----- - 3 files changed, 15 insertions(+), 14 deletions(-) - -diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c -index 137cd5e..a64d6fd 100644 ---- a/libavfilter/vf_bwdif.c -+++ b/libavfilter/vf_bwdif.c -@@ -190,14 +190,15 @@ static int config_props(AVFilterLink *link) - av_log(ctx, AV_LOG_ERROR, "Failure to setup CC FIFO queue\n"); - return ret; - } -+ -+ yadif->csp = av_pix_fmt_desc_get(link->format); -+ yadif->filter = filter; - -- if (link->w < 3 || link->h < 4) { -- av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or 4 lines is not supported\n"); -+ if (AV_CEIL_RSHIFT(link->w, yadif->csp->log2_chroma_w) < 3 || AV_CEIL_RSHIFT(link->h, yadif->csp->log2_chroma_h) < 4) { -+ av_log(ctx, AV_LOG_ERROR, "Video with planes less than 3 columns or 4 lines is not supported\n"); - return AVERROR(EINVAL); - } - -- yadif->csp = av_pix_fmt_desc_get(link->format); -- yadif->filter = filter; - ff_bwdif_init_filter_line(&s->dsp, yadif->csp->comp[0].depth); - - return 0; -diff --git a/libavfilter/vf_bwdif_cuda.c b/libavfilter/vf_bwdif_cuda.c -index a5ecfba..bca12dd 100644 ---- a/libavfilter/vf_bwdif_cuda.c -+++ b/libavfilter/vf_bwdif_cuda.c -@@ -296,14 +296,15 @@ static int config_output(AVFilterLink *link) - link->frame_rate = av_mul_q(ctx->inputs[0]->frame_rate, - (AVRational){2, 1}); - -- if (link->w < 3 || link->h < 3) { -- av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or lines is not supported\n"); -- ret = AVERROR(EINVAL); -- goto exit; -- } - - y->csp = av_pix_fmt_desc_get(output_frames->sw_format); - y->filter = filter; -+ -+ if (AV_CEIL_RSHIFT(link->w, y->csp->log2_chroma_w) < 3 || AV_CEIL_RSHIFT(link->h, y->csp->log2_chroma_h) < 3) { -+ av_log(ctx, AV_LOG_ERROR, "Video with planes less than 3 columns or lines is not supported\n"); -+ ret = AVERROR(EINVAL); -+ goto exit; -+ } - - ret = CHECK_CU(cu->cuCtxPushCurrent(s->hwctx->cuda_ctx)); - if (ret < 0) -diff --git a/libavfilter/vf_bwdif_vulkan.c b/libavfilter/vf_bwdif_vulkan.c -index 690a89c..aaa881b 100644 ---- a/libavfilter/vf_bwdif_vulkan.c -+++ b/libavfilter/vf_bwdif_vulkan.c -@@ -362,15 +362,14 @@ static int bwdif_vulkan_config_output(AVFilterLink *outlink) - outlink->frame_rate = av_mul_q(avctx->inputs[0]->frame_rate, - (AVRational){2, 1}); - -- if (outlink->w < 4 || outlink->h < 4) { -- av_log(avctx, AV_LOG_ERROR, "Video of less than 4 columns or lines is not " -- "supported\n"); -- return AVERROR(EINVAL); -- } - - y->csp = av_pix_fmt_desc_get(vkctx->frames->sw_format); - y->filter = bwdif_vulkan_filter_frame; - -+ if (AV_CEIL_RSHIFT(outlink->w, y->csp->log2_chroma_w) < 4 || AV_CEIL_RSHIFT(outlink->h, y->csp->log2_chroma_h) < 4) { -+ av_log(avctx, AV_LOG_ERROR, "Video with planes less than 4 columns or lines is not supported\n"); -+ return AVERROR(EINVAL); -+ } - return init_filter(avctx); - } - --- -2.43.0 - diff --git a/fix-CVE-2023-50007.patch b/fix-CVE-2023-50007.patch deleted file mode 100644 index 617dff04e61ac9a9ad69a5c6dace2e33b1b46181..0000000000000000000000000000000000000000 --- a/fix-CVE-2023-50007.patch +++ /dev/null @@ -1,74 +0,0 @@ -From b1942734c7cbcdc9034034373abcc9ecb9644c47 Mon Sep 17 00:00:00 2001 -From: Paul B Mahol -Date: Mon, 27 Nov 2023 11:45:34 +0100 -Subject: [PATCH] avfilter/af_afwtdn: fix crash with EOF handling - ---- - libavfilter/af_afwtdn.c | 34 +++++++++++++++++++--------------- - 1 file changed, 19 insertions(+), 15 deletions(-) - -diff --git a/libavfilter/af_afwtdn.c b/libavfilter/af_afwtdn.c -index 0fcfa77..63b7f5f 100644 ---- a/libavfilter/af_afwtdn.c -+++ b/libavfilter/af_afwtdn.c -@@ -408,6 +408,7 @@ typedef struct AudioFWTDNContext { - - uint64_t sn; - int64_t eof_pts; -+ int eof; - - int wavelet_type; - int channels; -@@ -1069,7 +1070,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) - s->drop_samples = 0; - } else { - if (s->padd_samples < 0 && eof) { -- out->nb_samples += s->padd_samples; -+ out->nb_samples = FFMAX(0, out->nb_samples + s->padd_samples); - s->padd_samples = 0; - } - if (!eof) -@@ -1208,23 +1209,26 @@ static int activate(AVFilterContext *ctx) - - FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink); - -- ret = ff_inlink_consume_samples(inlink, s->nb_samples, s->nb_samples, &in); -- if (ret < 0) -- return ret; -- if (ret > 0) -- return filter_frame(inlink, in); -+ if (!s->eof) { -+ ret = ff_inlink_consume_samples(inlink, s->nb_samples, s->nb_samples, &in); -+ if (ret < 0) -+ return ret; -+ if (ret > 0) -+ return filter_frame(inlink, in); -+ } - - if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { -- if (status == AVERROR_EOF) { -- while (s->padd_samples != 0) { -- ret = filter_frame(inlink, NULL); -- if (ret < 0) -- return ret; -- } -- ff_outlink_set_status(outlink, status, pts); -- return ret; -- } -+ if (status == AVERROR_EOF) -+ s->eof = 1; - } -+ -+ if (s->eof && s->padd_samples != 0) { -+ return filter_frame(inlink, NULL); -+ } else if (s->eof) { -+ ff_outlink_set_status(outlink, AVERROR_EOF, s->eof_pts); -+ return 0; -+ } -+ - FF_FILTER_FORWARD_WANTED(outlink, inlink); - - return FFERROR_NOT_READY; --- -2.27.0 - diff --git a/fix-CVE-2023-50008.patch b/fix-CVE-2023-50008.patch deleted file mode 100644 index d0ab2747274e01a993b3ccc0e75c2a55910c0738..0000000000000000000000000000000000000000 --- a/fix-CVE-2023-50008.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5f87a68cf70dafeab2fb89b42e41a4c29053b89b Mon Sep 17 00:00:00 2001 -From: Paul B Mahol -Date: Mon, 27 Nov 2023 12:08:20 +0100 -Subject: [PATCH] avfilter/vf_colorcorrect: fix memory leaks - ---- - libavfilter/vf_colorcorrect.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libavfilter/vf_colorcorrect.c b/libavfilter/vf_colorcorrect.c -index 1c4dea5..6bdec2c 100644 ---- a/libavfilter/vf_colorcorrect.c -+++ b/libavfilter/vf_colorcorrect.c -@@ -497,6 +497,8 @@ static av_cold void uninit(AVFilterContext *ctx) - ColorCorrectContext *s = ctx->priv; - - av_freep(&s->analyzeret); -+ av_freep(&s->uhistogram); -+ av_freep(&s->vhistogram); - } - - static const AVFilterPad colorcorrect_inputs[] = { --- -2.27.0 - diff --git a/fix-CVE-2024-31578.patch b/fix-CVE-2024-31578.patch deleted file mode 100644 index 649cb912ff830c633e57203184f08fed3d94f354..0000000000000000000000000000000000000000 --- a/fix-CVE-2024-31578.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3bb00c0a420c3ce83c6fafee30270d69622ccad7 Mon Sep 17 00:00:00 2001 -From: Zhao Zhili -Date: Mon, 29 Apr 2024 17:02:47 +0800 -Subject: [PATCH] avutil/hwcontext: Don't assume frames_uninit is reentrant. -Fix heap use after free when vulkan_frames_init failed. - -Signed-off-by: Zhao Zhili ---- - libavutil/hwcontext.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c -index 3650d46..0ef3479 100644 ---- a/libavutil/hwcontext.c -+++ b/libavutil/hwcontext.c -@@ -363,7 +363,7 @@ int av_hwframe_ctx_init(AVBufferRef *ref) - if (ctx->internal->hw_type->frames_init) { - ret = ctx->internal->hw_type->frames_init(ctx); - if (ret < 0) -- goto fail; -+ return ret; - } - - if (ctx->internal->pool_internal && !ctx->pool) -@@ -373,14 +373,10 @@ int av_hwframe_ctx_init(AVBufferRef *ref) - if (ctx->initial_pool_size > 0) { - ret = hwframe_pool_prealloc(ref); - if (ret < 0) -- goto fail; -+ return ret; - } - - return 0; --fail: -- if (ctx->internal->hw_type->frames_uninit) -- ctx->internal->hw_type->frames_uninit(ctx); -- return ret; - } - - int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ref, --- -2.27.0 diff --git a/fix-CVE-2024-31582.patch b/fix-CVE-2024-31582.patch deleted file mode 100644 index d4b08ad06b3595861d2fc21f468c250e85e35bbe..0000000000000000000000000000000000000000 --- a/fix-CVE-2024-31582.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 99debe5f823f45a482e1dc08de35879aa9c74bd2 Mon Sep 17 00:00:00 2001 -From: Zhao Zhili -Date: Mon, 29 Apr 2024 17:42:23 +0800 -Subject: [PATCH] avfilter/vf_codecview: fix heap buffer overflow. -And improve the performance by a little bit. - -Signed-off-by: Zhao Zhili ---- - libavfilter/vf_codecview.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c -index 55d9c8c..f65ccbd 100644 ---- a/libavfilter/vf_codecview.c -+++ b/libavfilter/vf_codecview.c -@@ -216,9 +216,6 @@ static void draw_block_rectangle(uint8_t *buf, int sx, int sy, int w, int h, ptr - buf[sx + w - 1] = color; - buf += stride; - } -- -- for (int x = sx; x < sx + w; x++) -- buf[x] = color; - } - - static int filter_frame(AVFilterLink *inlink, AVFrame *frame) --- -2.27.0 diff --git a/fix-CVE-2024-32230.patch b/fix-CVE-2024-32230.patch deleted file mode 100644 index 7ccac228cea3248939eea404e16d05cecc8beccb..0000000000000000000000000000000000000000 --- a/fix-CVE-2024-32230.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer -Date: Mon, 8 Apr 2024 18:38:42 +0200 -Subject: [PATCH] avcodec/mpegvideo_enc: Fix 1 line and one column images - -Fixes: Ticket10952 -Fixes: poc21ffmpeg -Signed-off-by: Michael Niedermayer ---- - libavcodec/mpegvideo_enc.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c -index 0e3255c0fb..2a75973ac4 100644 ---- a/libavcodec/mpegvideo_enc.c -+++ b/libavcodec/mpegvideo_enc.c -@@ -1198,8 +1198,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) - int 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; --- -2.33.0 - diff --git a/fix_libsvgdec_compile_error.patch b/fix_libsvgdec_compile_error.patch deleted file mode 100644 index 156066863b9e704d5226c6e887a09bd0dd3587c8..0000000000000000000000000000000000000000 --- a/fix_libsvgdec_compile_error.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a414e25b60b8d11e30479d4f33fb9a94719dae8e Mon Sep 17 00:00:00 2001 -From: technology208 -Date: Tue, 4 Jun 2024 10:44:30 +0800 -Subject: [PATCH] fix_libsvgdec_compile_error.patch - ---- - libavcodec/librsvgdec.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libavcodec/librsvgdec.c b/libavcodec/librsvgdec.c -index c328fbc..756c26d 100644 ---- a/libavcodec/librsvgdec.c -+++ b/libavcodec/librsvgdec.c -@@ -90,8 +90,10 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame, - goto end; - - avctx->pix_fmt = AV_PIX_FMT_RGB32; -+#if LIBRSVG_MAJOR_VERSION > 2 || LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION >= 52 - viewport.width = dimensions.width; - viewport.height = dimensions.height; -+#endif - - ret = ff_get_buffer(avctx, frame, 0); - if (ret < 0) --- -2.33.0 -