Warning, /graphics/krita/3rdparty/ext_ffmpeg/0001-ffmpeg-Add-an-option-to-disable-UB-in-av_uninit.patch is written in an unsupported language. File is not indexed.

0001 From 5921c6afaeb3c244d5e50d5c73ab2efe62a03e57 Mon Sep 17 00:00:00 2001
0002 From: Dmitry Kazakov <dimula73@gmail.com>
0003 Date: Tue, 11 Apr 2023 10:32:47 +0200
0004 Subject: [PATCH 1/3] Add an option to disable UB in av_uninit
0005 
0006 Usage:
0007 meson configure -Dno_uninit_ub=true
0008 ---
0009  libavutil/attributes.h | 4 +++-
0010  meson.build            | 5 +++++
0011  meson_options.txt      | 1 +
0012  3 files changed, 9 insertions(+), 1 deletion(-)
0013 
0014 diff --git a/libavutil/attributes.h b/libavutil/attributes.h
0015 index 5cb9fe3452..d2c75f881c 100644
0016 --- a/libavutil/attributes.h
0017 +++ b/libavutil/attributes.h
0018 @@ -150,7 +150,9 @@
0019  #   define av_alias
0020  #endif
0021  
0022 -#if (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
0023 +#if defined(DISABLE_AV_UNINIT_UB)
0024 +#    define av_uninit(x) x=0
0025 +#elif (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
0026  #    define av_uninit(x) x=x
0027  #else
0028  #    define av_uninit(x) x
0029 diff --git a/meson.build b/meson.build
0030 index b3f1877346..a14241eb45 100644
0031 --- a/meson.build
0032 +++ b/meson.build
0033 @@ -464,6 +464,11 @@ types_list = [
0034    'struct_v4l2_frmivalenum_discrete',
0035  ]
0036  
0037 +if get_option('no_uninit_ub')
0038 +  add_global_arguments('-DDISABLE_AV_UNINIT_UB=1', language : 'c')
0039 +  add_global_arguments('-DDISABLE_AV_UNINIT_UB=1', language : 'cpp')
0040 +endif
0041 +
0042  conf.set('runtime_cpudetect', 1)
0043  asm = get_option('asm')
0044  inline_asm = get_option('inline_asm')
0045 diff --git a/meson_options.txt b/meson_options.txt
0046 index 7608c084e2..d02877e76c 100644
0047 --- a/meson_options.txt
0048 +++ b/meson_options.txt
0049 @@ -2202,3 +2202,4 @@ option('inline_asm', type: 'feature', value: 'enabled', description: 'Enable inl
0050  # cli is disabled by default to speed up the build since it links statically
0051  option('cli', type: 'feature', value: 'disabled')
0052  option('tests', type : 'feature', value : 'auto', description : 'Build tests', yield : true)
0053 +option('no_uninit_ub', type: 'boolean', value: false, description: 'Disable UB in av_uninit optimization')
0054 -- 
0055 2.40.1.windows.1
0056