summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-multimedia')
-rw-r--r--meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb6
-rw-r--r--meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch46
-rw-r--r--meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch43
-rw-r--r--meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch79
-rw-r--r--meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch46
-rw-r--r--meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch126
-rw-r--r--meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb7
-rw-r--r--meta-oe/recipes-multimedia/cdrkit/files/fix-incompatible-pointer-type-error.patch44
-rw-r--r--meta-oe/recipes-multimedia/faad2/faad2_2.11.2.bb (renamed from meta-oe/recipes-multimedia/faad2/faad2_2.11.1.bb)3
-rw-r--r--meta-oe/recipes-multimedia/id3lib/id3lib_3.8.3.bb2
-rw-r--r--meta-oe/recipes-multimedia/jack/a2jmidid_9.bb3
-rw-r--r--meta-oe/recipes-multimedia/jack/jack-example-tools_4.bb33
-rw-r--r--meta-oe/recipes-multimedia/jack/jack_1.9.22.bb16
-rw-r--r--meta-oe/recipes-multimedia/libass/libass_0.17.4.bb (renamed from meta-oe/recipes-multimedia/libass/libass_0.17.1.bb)5
-rw-r--r--meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb3
-rw-r--r--meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb1
-rw-r--r--meta-oe/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb3
-rw-r--r--meta-oe/recipes-multimedia/libjxl/libjxl/0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch56
-rw-r--r--meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb (renamed from meta-oe/recipes-multimedia/libjxl/libjxl_0.10.2.bb)17
-rw-r--r--meta-oe/recipes-multimedia/libmad/libmad/CVE-2017-8372_CVE-2017-8373.patch69
-rw-r--r--meta-oe/recipes-multimedia/libmad/libmad/CVE-2017-8374.patch830
-rw-r--r--meta-oe/recipes-multimedia/libmad/libmad_0.15.1b.bb9
-rw-r--r--meta-oe/recipes-multimedia/libmms/libmms_0.6.4.bb1
-rw-r--r--meta-oe/recipes-multimedia/libopus/libopus_1.5.2.bb2
-rw-r--r--meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb6
-rw-r--r--meta-oe/recipes-multimedia/libxmp/libxmp_4.6.3.bb10
-rw-r--r--meta-oe/recipes-multimedia/live555/live555_20210824.bb4
-rw-r--r--meta-oe/recipes-multimedia/mikmod/libmikmod_3.3.11.1.bb1
-rw-r--r--meta-oe/recipes-multimedia/mplayer/libplacebo_7.351.0.bb28
-rw-r--r--meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb116
-rw-r--r--meta-oe/recipes-multimedia/mplayer/mpv_0.40.0.bb102
-rw-r--r--meta-oe/recipes-multimedia/pulseaudio/pavucontrol_5.0.bb2
-rw-r--r--meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb3
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch46
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-media-ctl-Install-media-ctl-header-and-library-files.patch78
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-media-ctl-Install-media-ctl-pkg-config-files.patch49
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.28.1.bb (renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.26.1.bb)10
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb20
-rw-r--r--meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb1
-rw-r--r--meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch8
-rw-r--r--meta-oe/recipes-multimedia/webm/libvpx_1.15.2.bb (renamed from meta-oe/recipes-multimedia/webm/libvpx_1.14.0.bb)5
-rw-r--r--meta-oe/recipes-multimedia/xpext/xpext_1.0-5.bb5
-rw-r--r--meta-oe/recipes-multimedia/xsp/xsp/0001-fix-incompatible-pointer-types-build-error-in-gcc-15.patch40
-rw-r--r--meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb11
44 files changed, 1756 insertions, 239 deletions
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
index a09f84381e..50df31c7b9 100644
--- a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
+++ b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
@@ -13,8 +13,12 @@ SRC_URI = " \
13 file://0001-fix-negative-shift-constants.patch \ 13 file://0001-fix-negative-shift-constants.patch \
14 file://0002-fix-build-on-gcc6.patch \ 14 file://0002-fix-build-on-gcc6.patch \
15 file://0003-fix-CVE-2015-7747.patch \ 15 file://0003-fix-CVE-2015-7747.patch \
16 file://0004-Always-check-the-number-of-coefficients.patch \
17 file://0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch \
18 file://0006-Check-for-multiplication-overflow-in-sfconvert.patch \
19 file://0007-Actually-fail-when-error-occurs-in-parseFormat.patch \
20 file://0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch \
16" 21"
17SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008"
18SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782" 22SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
19 23
20inherit autotools lib_package pkgconfig 24inherit autotools lib_package pkgconfig
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch b/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch
new file mode 100644
index 0000000000..17a97163f5
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch
@@ -0,0 +1,46 @@
1From c48e4c6503f7dabd41f11d4c9c7b7f8960e7f2c0 Mon Sep 17 00:00:00 2001
2From: Antonio Larrosa <larrosa@kde.org>
3Date: Mon, 6 Mar 2017 12:51:22 +0100
4Subject: [PATCH] Always check the number of coefficients
5
6When building the library with NDEBUG, asserts are eliminated
7so it's better to always check that the number of coefficients
8is inside the array range.
9
10This fixes the 00191-audiofile-indexoob issue in #41
11
12Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
13
14CVE: CVE-2017-6827
15CVE: CVE-2017-6828
16CVE: CVE-2017-6832
17CVE: CVE-2017-6833
18CVE: CVE-2017-6835
19CVE: CVE-2017-6837
20CVE: CVE-2020-18781
21Upstream-Status: Inactive-Upstream [lastrelease: 2013]
22Signed-off-by: Peter Marko <peter.marko@siemens.com>
23---
24 libaudiofile/WAVE.cpp | 6 ++++++
25 1 file changed, 6 insertions(+)
26
27diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp
28index 0e81cf7..61f9541 100644
29--- a/libaudiofile/WAVE.cpp
30+++ b/libaudiofile/WAVE.cpp
31@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
32
33 /* numCoefficients should be at least 7. */
34 assert(numCoefficients >= 7 && numCoefficients <= 255);
35+ if (numCoefficients < 7 || numCoefficients > 255)
36+ {
37+ _af_error(AF_BAD_HEADER,
38+ "Bad number of coefficients");
39+ return AF_FAIL;
40+ }
41
42 m_msadpcmNumCoefficients = numCoefficients;
43
44--
452.11.0
46
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch b/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch
new file mode 100644
index 0000000000..00bb7e597e
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch
@@ -0,0 +1,43 @@
1From 25eb00ce913452c2e614548d7df93070bf0d066f Mon Sep 17 00:00:00 2001
2From: Antonio Larrosa <larrosa@kde.org>
3Date: Mon, 6 Mar 2017 18:02:31 +0100
4Subject: [PATCH] clamp index values to fix index overflow in IMA.cpp
5
6This fixes #33
7(also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=1026981
8and https://blogs.gentoo.org/ago/2017/02/20/audiofile-global-buffer-overflow-in-decodesample-ima-cpp/)
9
10Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
11
12CVE: CVE-2017-6829
13Upstream-Status: Inactive-Upstream [lastrelease: 2013]
14Signed-off-by: Peter Marko <peter.marko@siemens.com>
15---
16 libaudiofile/modules/IMA.cpp | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/libaudiofile/modules/IMA.cpp b/libaudiofile/modules/IMA.cpp
20index 7476d44..df4aad6 100644
21--- a/libaudiofile/modules/IMA.cpp
22+++ b/libaudiofile/modules/IMA.cpp
23@@ -169,7 +169,7 @@ int IMA::decodeBlockWAVE(const uint8_t *encoded, int16_t *decoded)
24 if (encoded[1] & 0x80)
25 m_adpcmState[c].previousValue -= 0x10000;
26
27- m_adpcmState[c].index = encoded[2];
28+ m_adpcmState[c].index = clamp(encoded[2], 0, 88);
29
30 *decoded++ = m_adpcmState[c].previousValue;
31
32@@ -210,7 +210,7 @@ int IMA::decodeBlockQT(const uint8_t *encoded, int16_t *decoded)
33 predictor -= 0x10000;
34
35 state.previousValue = clamp(predictor, MIN_INT16, MAX_INT16);
36- state.index = encoded[1] & 0x7f;
37+ state.index = clamp(encoded[1] & 0x7f, 0, 88);
38 encoded += 2;
39
40 for (int n=0; n<m_framesPerPacket; n+=2)
41--
422.11.0
43
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch b/meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch
new file mode 100644
index 0000000000..ec21b09f30
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch
@@ -0,0 +1,79 @@
1From 7d65f89defb092b63bcbc5d98349fb222ca73b3c Mon Sep 17 00:00:00 2001
2From: Antonio Larrosa <larrosa@kde.org>
3Date: Mon, 6 Mar 2017 13:54:52 +0100
4Subject: [PATCH] Check for multiplication overflow in sfconvert
5
6Checks that a multiplication doesn't overflow when
7calculating the buffer size, and if it overflows,
8reduce the buffer size instead of failing.
9
10This fixes the 00192-audiofile-signintoverflow-sfconvert case
11in #41
12
13Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
14
15CVE: CVE-2017-6830
16CVE: CVE-2017-6834
17CVE: CVE-2017-6836
18CVE: CVE-2017-6838
19Upstream-Status: Inactive-Upstream [lastrelease: 2013]
20Signed-off-by: Peter Marko <peter.marko@siemens.com>
21---
22 sfcommands/sfconvert.c | 34 ++++++++++++++++++++++++++++++++--
23 1 file changed, 32 insertions(+), 2 deletions(-)
24
25diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c
26index 80a1bc4..970a3e4 100644
27--- a/sfcommands/sfconvert.c
28+++ b/sfcommands/sfconvert.c
29@@ -45,6 +45,33 @@ void printusage (void);
30 void usageerror (void);
31 bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid);
32
33+int firstBitSet(int x)
34+{
35+ int position=0;
36+ while (x!=0)
37+ {
38+ x>>=1;
39+ ++position;
40+ }
41+ return position;
42+}
43+
44+#ifndef __has_builtin
45+#define __has_builtin(x) 0
46+#endif
47+
48+int multiplyCheckOverflow(int a, int b, int *result)
49+{
50+#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow))
51+ return __builtin_mul_overflow(a, b, result);
52+#else
53+ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits
54+ return true;
55+ *result = a * b;
56+ return false;
57+#endif
58+}
59+
60 int main (int argc, char **argv)
61 {
62 if (argc == 2)
63@@ -323,8 +350,11 @@ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid)
64 {
65 int frameSize = afGetVirtualFrameSize(infile, trackid, 1);
66
67- const int kBufferFrameCount = 65536;
68- void *buffer = malloc(kBufferFrameCount * frameSize);
69+ int kBufferFrameCount = 65536;
70+ int bufferSize;
71+ while (multiplyCheckOverflow(kBufferFrameCount, frameSize, &bufferSize))
72+ kBufferFrameCount /= 2;
73+ void *buffer = malloc(bufferSize);
74
75 AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK);
76 AFframecount totalFramesWritten = 0;
77--
782.11.0
79
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch b/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
new file mode 100644
index 0000000000..38294ca200
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
@@ -0,0 +1,46 @@
1From a2e9eab8ea87c4ffc494d839ebb4ea145eb9f2e6 Mon Sep 17 00:00:00 2001
2From: Antonio Larrosa <larrosa@kde.org>
3Date: Mon, 6 Mar 2017 18:59:26 +0100
4Subject: [PATCH] Actually fail when error occurs in parseFormat
5
6When there's an unsupported number of bits per sample or an invalid
7number of samples per block, don't only print an error message using
8the error handler, but actually stop parsing the file.
9
10This fixes #35 (also reported at
11https://bugzilla.opensuse.org/show_bug.cgi?id=1026983 and
12https://blogs.gentoo.org/ago/2017/02/20/audiofile-heap-based-buffer-overflow-in-imadecodeblockwave-ima-cpp/
13)
14
15Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
16
17CVE: CVE-2017-6831
18Upstream-Status: Inactive-Upstream [lastrelease: 2013]
19Signed-off-by: Peter Marko <peter.marko@siemens.com>
20---
21 libaudiofile/WAVE.cpp | 2 ++
22 1 file changed, 2 insertions(+)
23
24diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp
25index 0e81cf7..d762249 100644
26--- a/libaudiofile/WAVE.cpp
27+++ b/libaudiofile/WAVE.cpp
28@@ -326,6 +326,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
29 {
30 _af_error(AF_BAD_NOT_IMPLEMENTED,
31 "IMA ADPCM compression supports only 4 bits per sample");
32+ return AF_FAIL;
33 }
34
35 int bytesPerBlock = (samplesPerBlock + 14) / 8 * 4 * channelCount;
36@@ -333,6 +334,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
37 {
38 _af_error(AF_BAD_CODEC_CONFIG,
39 "Invalid samples per block for IMA ADPCM compression");
40+ return AF_FAIL;
41 }
42
43 track->f.sampleWidth = 16;
44--
452.11.0
46
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch b/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch
new file mode 100644
index 0000000000..857ed78c59
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch
@@ -0,0 +1,126 @@
1From beacc44eb8cdf6d58717ec1a5103c5141f1b37f9 Mon Sep 17 00:00:00 2001
2From: Antonio Larrosa <larrosa@kde.org>
3Date: Mon, 6 Mar 2017 13:43:53 +0100
4Subject: [PATCH] Check for multiplication overflow in MSADPCM decodeSample
5
6Check for multiplication overflow (using __builtin_mul_overflow
7if available) in MSADPCM.cpp decodeSample and return an empty
8decoded block if an error occurs.
9
10This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41
11
12Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
13
14CVE: CVE-2017-6839
15Upstream-Status: Inactive-Upstream [lastrelease: 2013]
16Signed-off-by: Peter Marko <peter.marko@siemens.com>
17---
18 libaudiofile/modules/BlockCodec.cpp | 5 ++--
19 libaudiofile/modules/MSADPCM.cpp | 47 +++++++++++++++++++++++++++++++++----
20 2 files changed, 46 insertions(+), 6 deletions(-)
21
22diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp
23index 45925e8..4731be1 100644
24--- a/libaudiofile/modules/BlockCodec.cpp
25+++ b/libaudiofile/modules/BlockCodec.cpp
26@@ -52,8 +52,9 @@ void BlockCodec::runPull()
27 // Decompress into m_outChunk.
28 for (int i=0; i<blocksRead; i++)
29 {
30- decodeBlock(static_cast<const uint8_t *>(m_inChunk->buffer) + i * m_bytesPerPacket,
31- static_cast<int16_t *>(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount);
32+ if (decodeBlock(static_cast<const uint8_t *>(m_inChunk->buffer) + i * m_bytesPerPacket,
33+ static_cast<int16_t *>(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount)==0)
34+ break;
35
36 framesRead += m_framesPerPacket;
37 }
38diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp
39index 8ea3c85..ef9c38c 100644
40--- a/libaudiofile/modules/MSADPCM.cpp
41+++ b/libaudiofile/modules/MSADPCM.cpp
42@@ -101,24 +101,60 @@ static const int16_t adaptationTable[] =
43 768, 614, 512, 409, 307, 230, 230, 230
44 };
45
46+int firstBitSet(int x)
47+{
48+ int position=0;
49+ while (x!=0)
50+ {
51+ x>>=1;
52+ ++position;
53+ }
54+ return position;
55+}
56+
57+#ifndef __has_builtin
58+#define __has_builtin(x) 0
59+#endif
60+
61+int multiplyCheckOverflow(int a, int b, int *result)
62+{
63+#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow))
64+ return __builtin_mul_overflow(a, b, result);
65+#else
66+ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits
67+ return true;
68+ *result = a * b;
69+ return false;
70+#endif
71+}
72+
73+
74 // Compute a linear PCM value from the given differential coded value.
75 static int16_t decodeSample(ms_adpcm_state &state,
76- uint8_t code, const int16_t *coefficient)
77+ uint8_t code, const int16_t *coefficient, bool *ok=NULL)
78 {
79 int linearSample = (state.sample1 * coefficient[0] +
80 state.sample2 * coefficient[1]) >> 8;
81+ int delta;
82
83 linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta;
84
85 linearSample = clamp(linearSample, MIN_INT16, MAX_INT16);
86
87- int delta = (state.delta * adaptationTable[code]) >> 8;
88+ if (multiplyCheckOverflow(state.delta, adaptationTable[code], &delta))
89+ {
90+ if (ok) *ok=false;
91+ _af_error(AF_BAD_COMPRESSION, "Error decoding sample");
92+ return 0;
93+ }
94+ delta >>= 8;
95 if (delta < 16)
96 delta = 16;
97
98 state.delta = delta;
99 state.sample2 = state.sample1;
100 state.sample1 = linearSample;
101+ if (ok) *ok=true;
102
103 return static_cast<int16_t>(linearSample);
104 }
105@@ -212,13 +248,16 @@ int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded)
106 {
107 uint8_t code;
108 int16_t newSample;
109+ bool ok;
110
111 code = *encoded >> 4;
112- newSample = decodeSample(*state[0], code, coefficient[0]);
113+ newSample = decodeSample(*state[0], code, coefficient[0], &ok);
114+ if (!ok) return 0;
115 *decoded++ = newSample;
116
117 code = *encoded & 0x0f;
118- newSample = decodeSample(*state[1], code, coefficient[1]);
119+ newSample = decodeSample(*state[1], code, coefficient[1], &ok);
120+ if (!ok) return 0;
121 *decoded++ = newSample;
122
123 encoded++;
124--
1252.11.0
126
diff --git a/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb b/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
index 9fd91114d7..4b57957cfc 100644
--- a/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
+++ b/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
@@ -13,11 +13,11 @@ SRC_URI = "${DEBIAN_MIRROR}/main/c/${BPN}/${BPN}_${PV}.orig.tar.gz \
13 file://0001-genisoimage-Add-missing-extern-definition.patch \ 13 file://0001-genisoimage-Add-missing-extern-definition.patch \
14 file://0001-add-new-option-eltorito-platform.patch \ 14 file://0001-add-new-option-eltorito-platform.patch \
15 file://0001-genisoimage-Add-checksum.h-and-md5.h-for-function-pr.patch \ 15 file://0001-genisoimage-Add-checksum.h-and-md5.h-for-function-pr.patch \
16 file://fix-incompatible-pointer-type-error.patch \
16 " 17 "
17SRC_URI:append:class-nativesdk = " \ 18SRC_URI:append:class-nativesdk = " \
18 file://0001-install-netscsid-to-bin-for-nativesdk.patch \ 19 file://0001-install-netscsid-to-bin-for-nativesdk.patch \
19" 20"
20SRC_URI[md5sum] = "efe08e2f3ca478486037b053acd512e9"
21SRC_URI[sha256sum] = "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da" 21SRC_URI[sha256sum] = "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da"
22 22
23inherit cmake 23inherit cmake
@@ -62,3 +62,8 @@ do_install:append() {
62} 62}
63 63
64BBCLASSEXTEND = "native nativesdk" 64BBCLASSEXTEND = "native nativesdk"
65
66# http://errors.yoctoproject.org/Errors/Details/766905/
67# cdrkit/1.1.11/cdrkit-1.1.11/genisoimage/eltorito.c:399:41: error: passing argument 1 of 'set_721' from incompatible pointer type [-Wincompatible-pointer-types]
68# cdrkit/1.1.11/cdrkit-1.1.11/genisoimage/eltorito.c:422:25: error: passing argument 1 of 'set_721' from incompatible pointer type [-Wincompatible-pointer-types]
69CFLAGS += "-Wno-error=incompatible-pointer-types"
diff --git a/meta-oe/recipes-multimedia/cdrkit/files/fix-incompatible-pointer-type-error.patch b/meta-oe/recipes-multimedia/cdrkit/files/fix-incompatible-pointer-type-error.patch
new file mode 100644
index 0000000000..887a54f7f2
--- /dev/null
+++ b/meta-oe/recipes-multimedia/cdrkit/files/fix-incompatible-pointer-type-error.patch
@@ -0,0 +1,44 @@
1Fix incompatible pointer type error when gcc option '-Wincompatible-pointer-types' set:
2
3cdrkit-1.1.11/genisoimage/eltorito.c:399:41: error: passing argument 1 of 'set_721' from incompatible pointer type [-Wincompatible-pointer-types]
4 399 | set_721(&last_section_header->entry_count, nentries);
5 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 | |
7 | char (*)[2]
8In file included from cdrkit/1.1.11/cdrkit-1.1.11/genisoimage/eltorito.c:39:
9cdrkit-1.1.11/genisoimage/genisoimage.h:507:21: note: expected 'char *' but argument is of type 'char (*)[2]'
10 507 | extern void set_721(char *, unsigned int);
11 | ^~~~~~
12
13Upstream-Status: Inactive-Upstream [lastrelease: 2010]
14
15[1]: https://en.wikipedia.org/wiki/Cdrkit
16
17Signed-off-by: Kai Kang <kai.kang@windriver.com>
18
19---
20 genisoimage/eltorito.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/genisoimage/eltorito.c b/genisoimage/eltorito.c
24index a804988..e48d58c 100644
25--- a/genisoimage/eltorito.c
26+++ b/genisoimage/eltorito.c
27@@ -396,7 +396,7 @@ get_torito_desc(struct eltorito_boot_descriptor *boot_desc)
28 (arch != newarch) ||
29 (current_boot_entry->type & ELTORITO_SECTION_HEADER)) {
30 if (last_section_header)
31- set_721(&last_section_header->entry_count, nentries);
32+ set_721((char *)(&last_section_header->entry_count), nentries);
33 nentries = 1;
34 last_section_header = (struct eltorito_sectionheader_entry *)
35 (de2->table + offset);
36@@ -419,7 +419,7 @@ get_torito_desc(struct eltorito_boot_descriptor *boot_desc)
37 }
38
39 if (last_section_header) {
40- set_721(&last_section_header->entry_count, nentries);
41+ set_721((char *)(&last_section_header->entry_count), nentries);
42 last_section_header->header_id[0] = EL_TORITO_SHDR_ID_LAST_SHDR;
43 }
44
diff --git a/meta-oe/recipes-multimedia/faad2/faad2_2.11.1.bb b/meta-oe/recipes-multimedia/faad2/faad2_2.11.2.bb
index bec9b75ebd..83fcaa248d 100644
--- a/meta-oe/recipes-multimedia/faad2/faad2_2.11.1.bb
+++ b/meta-oe/recipes-multimedia/faad2/faad2_2.11.2.bb
@@ -10,8 +10,7 @@ LICENSE_FLAGS = "commercial"
10PV .= "+git" 10PV .= "+git"
11 11
12SRC_URI = "git://github.com/knik0/faad2.git;branch=master;protocol=https" 12SRC_URI = "git://github.com/knik0/faad2.git;branch=master;protocol=https"
13SRCREV = "216f00e8ddba6f2c64caf481a04f1ddd78b93e78" 13SRCREV = "673a22a3c7c33e96e2ff7aae7c4d2bc190dfbf92"
14 14
15S = "${WORKDIR}/git"
16 15
17inherit cmake 16inherit cmake
diff --git a/meta-oe/recipes-multimedia/id3lib/id3lib_3.8.3.bb b/meta-oe/recipes-multimedia/id3lib/id3lib_3.8.3.bb
index 379c7e1b63..7ae262345b 100644
--- a/meta-oe/recipes-multimedia/id3lib/id3lib_3.8.3.bb
+++ b/meta-oe/recipes-multimedia/id3lib/id3lib_3.8.3.bb
@@ -14,6 +14,8 @@ SRC_URI[archive.sha256sum] = "2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b687
14SRC_URI[patch.md5sum] = "997c764d3be11c9a51779d93facf1118" 14SRC_URI[patch.md5sum] = "997c764d3be11c9a51779d93facf1118"
15SRC_URI[patch.sha256sum] = "ac2ee23ec89ba2af51d2c6dd5b1b6bf9f8a9f813de251bc182941439a4053176" 15SRC_URI[patch.sha256sum] = "ac2ee23ec89ba2af51d2c6dd5b1b6bf9f8a9f813de251bc182941439a4053176"
16 16
17CVE_STATUS[CVE-2007-4460] = "patched: fix is included in debian patch"
18
17inherit autotools 19inherit autotools
18 20
19# Unlike other Debian packages, id3lib*.diff.gz contains another series of 21# Unlike other Debian packages, id3lib*.diff.gz contains another series of
diff --git a/meta-oe/recipes-multimedia/jack/a2jmidid_9.bb b/meta-oe/recipes-multimedia/jack/a2jmidid_9.bb
index bfdf26ed46..7f8988c3c3 100644
--- a/meta-oe/recipes-multimedia/jack/a2jmidid_9.bb
+++ b/meta-oe/recipes-multimedia/jack/a2jmidid_9.bb
@@ -16,7 +16,6 @@ SRC_URI = " \
16 file://ppc_musl_ucontext.patch \ 16 file://ppc_musl_ucontext.patch \
17" 17"
18 18
19S = "${WORKDIR}/git"
20 19
21inherit meson pkgconfig 20inherit meson pkgconfig
22 21
@@ -24,6 +23,6 @@ EXTRA_OEMESON = "-Db_lto=false"
24 23
25LDFLAGS:append:libc-musl = " -lexecinfo" 24LDFLAGS:append:libc-musl = " -lexecinfo"
26 25
27export LINKFLAGS="${LDFLAGS}" 26export LINKFLAGS = "${LDFLAGS}"
28 27
29FILES:${PN} += "${datadir}/dbus-1/services" 28FILES:${PN} += "${datadir}/dbus-1/services"
diff --git a/meta-oe/recipes-multimedia/jack/jack-example-tools_4.bb b/meta-oe/recipes-multimedia/jack/jack-example-tools_4.bb
new file mode 100644
index 0000000000..58bbd8cac3
--- /dev/null
+++ b/meta-oe/recipes-multimedia/jack/jack-example-tools_4.bb
@@ -0,0 +1,33 @@
1DESCRIPTION = "JACK example tools and clients"
2SECTION = "libs/multimedia"
3
4LICENSE = "GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=4641e94ec96f98fabc56ff9cc48be14b"
6
7DEPENDS = "jack"
8
9SRC_URI = "git://github.com/jackaudio/jack-example-tools.git;branch=main;protocol=https"
10SRCREV = "33de8b4285fa5054af1b37fe0496c110604ed564"
11
12
13inherit meson pkgconfig
14
15PACKAGECONFIG ??= "alsa_in_out jack_rec"
16PACKAGECONFIG[alsa_in_out] = ",-Dalsa_in_out=disabled,alsa-lib"
17PACKAGECONFIG[jack_net] = ",-Djack_net=disabled"
18PACKAGECONFIG[jack_netsource] = ",-Djack_netsource=disabled,libopus"
19PACKAGECONFIG[jack_rec] = ",-Djack_rec=disabled"
20PACKAGECONFIG[opus_support] = ",-Dopus_support=disabled,libopus"
21PACKAGECONFIG[readline] = ",-Dreadline_support=disabled,readline"
22
23# ZALSA requires packages that are not available (libzita-alsa-pcmi and libzita-resampler)
24EXTRA_OECONF = "-Dzalsa=disabled"
25
26# jack recipe previously packaged jack-utils when these were part of the jack2 repository
27# keep using jack-utils package name to provide compatibility with old image recipes
28PACKAGES =+ "jack-utils"
29
30FILES:jack-utils = " \
31 ${bindir}/* \
32 ${libdir}/jack/*.so \
33"
diff --git a/meta-oe/recipes-multimedia/jack/jack_1.9.22.bb b/meta-oe/recipes-multimedia/jack/jack_1.9.22.bb
index bb844e4ff1..3b3ea85349 100644
--- a/meta-oe/recipes-multimedia/jack/jack_1.9.22.bb
+++ b/meta-oe/recipes-multimedia/jack/jack_1.9.22.bb
@@ -24,36 +24,26 @@ SRCREV = "4f58969432339a250ce87fe855fb962c67d00ddb"
24 24
25UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" 25UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
26 26
27S = "${WORKDIR}/git"
28 27
29inherit waf pkgconfig 28inherit waf pkgconfig
30 29
31PACKAGECONFIG ??= "alsa" 30PACKAGECONFIG ??= "alsa"
32PACKAGECONFIG[alsa] = "--alsa=yes,--alsa=no,alsa-lib" 31PACKAGECONFIG[alsa] = "--alsa=yes,--alsa=no,alsa-lib"
33# --dbus only stops building jackd -> add --classic 32# --dbus only stops building jackd -> add --classic
34PACKAGECONFIG[dbus] = "--dbus --classic,,dbus" 33PACKAGECONFIG[dbus] = "--dbus --classic,,dbus,python3-core"
35PACKAGECONFIG[opus] = "--opus=yes,--opus=no,libopus" 34PACKAGECONFIG[opus] = "--opus=yes,--opus=no,libopus"
36 35
37# portaudio is for windows builds only 36# portaudio is for windows builds only
38EXTRA_OECONF = "--portaudio=no" 37EXTRA_OECONF = "--portaudio=no"
39 38
40do_install:append() { 39PACKAGE_BEFORE_PN = "libjack jack-server"
41 if ! ${@bb.utils.contains('PACKAGECONFIG', 'dbus', True, False, d)}; then
42 rm -f ${D}${bindir}/jack_control
43 fi
44}
45
46PACKAGES =+ "libjack jack-server jack-utils"
47 40
48RDEPENDS:jack-dev:remove = "${PN} (= ${EXTENDPKGV})" 41RDEPENDS:jack-dev:remove = "${PN} (= ${EXTENDPKGV})"
49 42
50FILES:libjack = "${libdir}/*.so.* ${libdir}/jack/*.so" 43FILES:libjack = "${libdir}/*.so.* ${libdir}/jack/*.so"
44
51FILES:jack-server = " \ 45FILES:jack-server = " \
52 ${datadir}/dbus-1/services \ 46 ${datadir}/dbus-1/services \
53 ${bindir}/jackdbus \ 47 ${bindir}/jackdbus \
54 ${bindir}/jackd \ 48 ${bindir}/jackd \
55" 49"
56FILES:jack-utils = "${bindir}/*"
57
58FILES:${PN}-doc += " ${datadir}/jack-audio-connection-kit/reference/html/*"
59
diff --git a/meta-oe/recipes-multimedia/libass/libass_0.17.1.bb b/meta-oe/recipes-multimedia/libass/libass_0.17.4.bb
index 800ad1b15e..3165736981 100644
--- a/meta-oe/recipes-multimedia/libass/libass_0.17.1.bb
+++ b/meta-oe/recipes-multimedia/libass/libass_0.17.4.bb
@@ -7,9 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a42532a0684420bdb15556c3cdd49a75"
7 7
8DEPENDS = "fontconfig freetype fribidi harfbuzz" 8DEPENDS = "fontconfig freetype fribidi harfbuzz"
9 9
10SRC_URI = "git://github.com/libass/libass.git;protocol=https;branch=0.17.1-branch" 10SRC_URI = "git://github.com/libass/libass.git;protocol=https;branch=master"
11SRCREV = "e8ad72accd3a84268275a9385beb701c9284e5b3" 11SRCREV = "bbb3c7f1570a4a021e52683f3fbdf74fe492ae84"
12S = "${WORKDIR}/git"
13 12
14inherit autotools pkgconfig 13inherit autotools pkgconfig
15 14
diff --git a/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb b/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb
index 53404e54a8..42507051f6 100644
--- a/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb
+++ b/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb
@@ -9,6 +9,9 @@ DEPENDS = "libcdio"
9SRC_URI = "${GNU_MIRROR}/libcdio/${BP}.tar.bz2" 9SRC_URI = "${GNU_MIRROR}/libcdio/${BP}.tar.bz2"
10SRC_URI[sha256sum] = "33b1cf305ccfbfd03b43936975615000ce538b119989c4bec469577570b60e8a" 10SRC_URI[sha256sum] = "33b1cf305ccfbfd03b43936975615000ce538b119989c4bec469577570b60e8a"
11 11
12UPSTREAM_CHECK_URI = "https://github.com/rocky/libcdio-paranoia/releases"
13UPSTREAM_CHECK_REGEX = "release-(?P<pver>\d+(\.\d+)+\+\d+(\.\d+)+)"
14
12inherit autotools pkgconfig 15inherit autotools pkgconfig
13 16
14PACKAGES += "${PN}-utils" 17PACKAGES += "${PN}-utils"
diff --git a/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb b/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb
index 8562462cba..d986f90d72 100644
--- a/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb
+++ b/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb
@@ -9,7 +9,6 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.bz2 \
9 file://Drop-LIBCDIO_SOURCE_PATH-by-dropping-STRIP_FROM_PATH.patch \ 9 file://Drop-LIBCDIO_SOURCE_PATH-by-dropping-STRIP_FROM_PATH.patch \
10 " 10 "
11 11
12SRC_URI[md5sum] = "aa7629e8f73662a762f64c444b901055"
13SRC_URI[sha256sum] = "8550e9589dbd594bfac93b81ecf129b1dc9d0d51e90f9696f1b2f9b2af32712b" 12SRC_URI[sha256sum] = "8550e9589dbd594bfac93b81ecf129b1dc9d0d51e90f9696f1b2f9b2af32712b"
14 13
15inherit autotools pkgconfig 14inherit autotools pkgconfig
diff --git a/meta-oe/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb b/meta-oe/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
index 850918d319..23487329fb 100644
--- a/meta-oe/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
+++ b/meta-oe/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
@@ -19,9 +19,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libid3tag-${PV}.tar.gz \
19UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mad/files/libid3tag/" 19UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mad/files/libid3tag/"
20UPSTREAM_CHECK_REGEX = "/projects/mad/files/libid3tag/(?P<pver>.*)/$" 20UPSTREAM_CHECK_REGEX = "/projects/mad/files/libid3tag/(?P<pver>.*)/$"
21 21
22SRC_URI[md5sum] = "e5808ad997ba32c498803822078748c3"
23SRC_URI[sha256sum] = "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151" 22SRC_URI[sha256sum] = "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151"
24 23
25S = "${WORKDIR}/libid3tag-${PV}" 24S = "${UNPACKDIR}/libid3tag-${PV}"
26 25
27inherit autotools pkgconfig 26inherit autotools pkgconfig
diff --git a/meta-oe/recipes-multimedia/libjxl/libjxl/0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch b/meta-oe/recipes-multimedia/libjxl/libjxl/0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch
new file mode 100644
index 0000000000..287dfc8ca8
--- /dev/null
+++ b/meta-oe/recipes-multimedia/libjxl/libjxl/0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch
@@ -0,0 +1,56 @@
1From 0cf439c243dfdb6eee6133ee87172235a42e59c9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 14 Sep 2024 22:04:06 +0000
4Subject: [PATCH] cmake: Do not use -mrelax-all with clang on RISCV64
5
6This option causes clang 19+ to crash on riscv64
7
8For RISC-V -mrelax-all causes the assembler stage to convert
9all conditional branches into
10
11 bcc reg, reg, tmplabel
12 jmp target
13tmplabel:
14
15Unconditional jmp can reach targets a lot further than a conditional branch.
16Unfortunately, jmp also has a limited range so sometimes needs to be
17converted to an indirect jump which requires a scratch register.
18We do all branch relaxation early for RISC-V during the compilation
19stage so we can allocate the scratch register.
20
21If the assembler also does branch relaxation it will increase the size
22of the function and may cause unconditional jmps to go out of range.
23If this happens, linking will fail.
24
25Upstream-Status: Submitted [https://github.com/libjxl/libjxl/pull/3826]
26Signed-off-by: Khem Raj <raj.khem@gmail.com>
27---
28 CMakeLists.txt | 2 +-
29 CONTRIBUTORS | 1 +
30 2 files changed, 2 insertions(+), 1 deletion(-)
31
32diff --git a/CMakeLists.txt b/CMakeLists.txt
33index 8b2ccb57..39bee096 100644
34--- a/CMakeLists.txt
35+++ b/CMakeLists.txt
36@@ -335,7 +335,7 @@ else ()
37
38 # Machine flags.
39 add_compile_options(-funwind-tables)
40- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
41+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "riscv")
42 add_compile_options("SHELL:-Xclang -mrelax-all")
43 endif()
44 if (CXX_CONSTRUCTOR_ALIASES_SUPPORTED)
45diff --git a/CONTRIBUTORS b/CONTRIBUTORS
46index 848096f9..a88c6157 100644
47--- a/CONTRIBUTORS
48+++ b/CONTRIBUTORS
49@@ -10,6 +10,7 @@ Iulia-Maria Comșa
50 Jan Wassenberg
51 Jon Sneyers
52 Jyrki Alakuijala
53+Khem Raj
54 Krzysztof Potempa
55 Lode Vandevenne
56 Luca Versari
diff --git a/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.2.bb b/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb
index eced6c7726..2405126e5c 100644
--- a/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.2.bb
+++ b/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb
@@ -8,17 +8,17 @@ inherit cmake pkgconfig mime
8 8
9DEPENDS = "highway brotli" 9DEPENDS = "highway brotli"
10 10
11SRC_URI = "gitsm://github.com/libjxl/libjxl.git;protocol=https;nobranch=1" 11SRC_URI = "gitsm://github.com/libjxl/libjxl.git;protocol=https;nobranch=1 \
12 file://0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch \
13 "
12 14
13SRCREV = "e1489592a770b989303b0edc5cc1dc447bbe0515" 15SRCREV = "4a3b22d2600f92d8706fb72d85d52bfee2acbd54"
14S = "${WORKDIR}/git"
15 16
16EXTRA_OECMAKE = " \ 17EXTRA_OECMAKE = " \
17 -DCMAKE_BUILD_TYPE=Release \ 18 -DCMAKE_BUILD_TYPE=Release \
18 -DJPEGXL_ENABLE_PLUGINS=ON \ 19 -DJPEGXL_ENABLE_PLUGINS=ON \
19 -DBUILD_TESTING=OFF \ 20 -DBUILD_TESTING=OFF \
20 -DJPEGXL_WARNINGS_AS_ERRORS=OFF \ 21 -DJPEGXL_WARNINGS_AS_ERRORS=OFF \
21 -DJPEGXL_ENABLE_SIZELESS_VECTORS=ON \
22 -DJPEGXL_ENABLE_SJPEG=OFF \ 22 -DJPEGXL_ENABLE_SJPEG=OFF \
23 -DJPEGXL_ENABLE_BENCHMARK=OFF \ 23 -DJPEGXL_ENABLE_BENCHMARK=OFF \
24 -DJPEGXL_ENABLE_EXAMPLES=OFF \ 24 -DJPEGXL_ENABLE_EXAMPLES=OFF \
@@ -31,9 +31,16 @@ EXTRA_OECMAKE = " \
31 -DJPEGXL_ENABLE_TOOLS=OFF \ 31 -DJPEGXL_ENABLE_TOOLS=OFF \
32" 32"
33 33
34PACKAGECONFIG ?= "mime gdk-pixbuf-loader" 34PACKAGECONFIG ?= "mime gdk-pixbuf-loader sizeless-vectors"
35# libjxl/0.10.2/recipe-sysroot/usr/include/hwy/ops/rvv-inl.h:591:17: error: use
36# of undeclared identifier '__riscv_vsetvlmax_e8mf8'
37# 591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
38# | ^
39PACKAGECONFIG:remove:riscv64 = "sizeless-vectors"
40PACKAGECONFIG:remove:riscv32 = "sizeless-vectors"
35PACKAGECONFIG[gdk-pixbuf-loader] = "-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=ON,-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=OFF,gdk-pixbuf" 41PACKAGECONFIG[gdk-pixbuf-loader] = "-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=ON,-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=OFF,gdk-pixbuf"
36PACKAGECONFIG[gimp] = "-DJPEGXL_ENABLE_PLUGIN_GIMP210=ON,-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF,gimp" 42PACKAGECONFIG[gimp] = "-DJPEGXL_ENABLE_PLUGIN_GIMP210=ON,-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF,gimp"
37PACKAGECONFIG[mime] = "-DJPEGXL_ENABLE_PLUGIN_MIME=ON,-DJPEGXL_ENABLE_PLUGIN_MIME=OFF" 43PACKAGECONFIG[mime] = "-DJPEGXL_ENABLE_PLUGIN_MIME=ON,-DJPEGXL_ENABLE_PLUGIN_MIME=OFF"
44PACKAGECONFIG[sizeless-vectors] = "-DJPEGXL_ENABLE_SIZELESS_VECTORS=ON,-DJPEGXL_ENABLE_SIZELESS_VECTORS=OFF"
38 45
39FILES:${PN} += "${libdir}/gdk-pixbuf-2.0 ${datadir}" 46FILES:${PN} += "${libdir}/gdk-pixbuf-2.0 ${datadir}"
diff --git a/meta-oe/recipes-multimedia/libmad/libmad/CVE-2017-8372_CVE-2017-8373.patch b/meta-oe/recipes-multimedia/libmad/libmad/CVE-2017-8372_CVE-2017-8373.patch
new file mode 100644
index 0000000000..a57df492d0
--- /dev/null
+++ b/meta-oe/recipes-multimedia/libmad/libmad/CVE-2017-8372_CVE-2017-8373.patch
@@ -0,0 +1,69 @@
1From 7e8f6e5118e31455924940141a761a1589e8d85d Mon Sep 17 00:00:00 2001
2From: Kurt Roeckx <kurt@roeckx.be>
3Date: Sun, 28 Jan 2018 15:44:08 +0100
4Subject: [PATCH] Check the size of the main data
5
6The main data to decode a frame can come from the current frame and part of the
7previous frame, the so called bit reservoir. si.main_data_begin is the part of
8the previous frame we need for this frame. frame_space is the amount of main
9data that can be in this frame, and next_md_begin is the part of this frame that
10is going to be used for the next frame.
11
12The maximum amount of data from a previous frame that the format allows is 511
13bytes. The maximum frame size for the defined bitrates is at MPEG 2.5 layer 2
14at 320 kbit/s and 8 kHz sample rate which gives 72 * (320000 / 8000) + 1 = 2881.
15So those defines are not large enough:
16 # define MAD_BUFFER_GUARD 8
17 # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD)
18
19There is also support for a "free" bitrate which allows you to create any frame
20size, which can be larger than the buffer.
21
22Changing the defines is not an option since it's part of the ABI, so we check
23that the main data fits in the bufer.
24
25The previous frame data is stored in *stream->main_data and contains
26stream->md_len bytes. If stream->md_len is larger than the data we
27need from the previous frame (si.main_data_begin) it still wouldn't fit
28in the buffer, so just keep the data that we need.
29
30Source: https://salsa.debian.org/multimedia-team/libmad/-/blob/debian/0.15.1b-11/debian/patches/md_size.diff?ref_type=tags
31
32CVE: CVE-2017-8372
33CVE: CVE-2017-8373
34Upstream-Status: Inactive-Upstream [lastrelease: 2018]
35Signed-off-by: Peter Marko <peter.marko@siemens.com>
36---
37 layer3.c | 12 ++++++++++--
38 1 file changed, 10 insertions(+), 2 deletions(-)
39
40diff --git a/layer3.c b/layer3.c
41index 4e5d3fa..7dc4ca6 100644
42--- a/layer3.c
43+++ b/layer3.c
44@@ -2608,6 +2608,11 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame)
45 next_md_begin = 0;
46
47 md_len = si.main_data_begin + frame_space - next_md_begin;
48+ if (md_len + MAD_BUFFER_GUARD > MAD_BUFFER_MDLEN) {
49+ stream->error = MAD_ERROR_LOSTSYNC;
50+ stream->sync = 0;
51+ return -1;
52+ }
53
54 frame_used = 0;
55
56@@ -2625,8 +2630,11 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame)
57 }
58 }
59 else {
60- mad_bit_init(&ptr,
61- *stream->main_data + stream->md_len - si.main_data_begin);
62+ memmove(stream->main_data,
63+ *stream->main_data + stream->md_len - si.main_data_begin,
64+ si.main_data_begin);
65+ stream->md_len = si.main_data_begin;
66+ mad_bit_init(&ptr, *stream->main_data);
67
68 if (md_len > si.main_data_begin) {
69 assert(stream->md_len + md_len -
diff --git a/meta-oe/recipes-multimedia/libmad/libmad/CVE-2017-8374.patch b/meta-oe/recipes-multimedia/libmad/libmad/CVE-2017-8374.patch
new file mode 100644
index 0000000000..69a7153f07
--- /dev/null
+++ b/meta-oe/recipes-multimedia/libmad/libmad/CVE-2017-8374.patch
@@ -0,0 +1,830 @@
1From 05de6e0ddc2c911b725955d2af331ffd76aa8186 Mon Sep 17 00:00:00 2001
2From: Kurt Roeckx <kurt@roeckx.be>
3Date: Sun, 28 Jan 2018 19:26:36 +0100
4Subject: [PATCH] Check the size before reading with mad_bit_read
5
6There are various cases where it attemps to read past the end of the buffer
7using mad_bit_read(). Most functions didn't even know the size of the buffer
8they were reading from.
9
10Source: https://salsa.debian.org/multimedia-team/libmad/-/raw/debian/0.15.1b-11/debian/patches/length-check.patch?ref_type=tags
11
12CVE: CVE-2017-8374
13Upstream-Status: Inactive-Upstream [lastrelease: 2018]
14Signed-off-by: Peter Marko <peter.marko@siemens.com>
15---
16 bit.c | 3 +
17 frame.c | 20 +++++-
18 layer12.c | 112 +++++++++++++++++++++++++++---
19 layer3.c | 198 ++++++++++++++++++++++++++++++++++++++----------------
20 4 files changed, 262 insertions(+), 71 deletions(-)
21
22diff --git a/bit.c b/bit.c
23index c2bfb24..39ef50b 100644
24--- a/bit.c
25+++ b/bit.c
26@@ -138,6 +138,9 @@ unsigned long mad_bit_read(struct mad_bitptr *bitptr, unsigned int len)
27 {
28 register unsigned long value;
29
30+ if (len == 0)
31+ return 0;
32+
33 if (bitptr->left == CHAR_BIT)
34 bitptr->cache = *bitptr->byte;
35
36diff --git a/frame.c b/frame.c
37index 0cb3d0f..4b3aea8 100644
38--- a/frame.c
39+++ b/frame.c
40@@ -120,11 +120,18 @@ static
41 int decode_header(struct mad_header *header, struct mad_stream *stream)
42 {
43 unsigned int index;
44+ struct mad_bitptr bufend_ptr;
45
46 header->flags = 0;
47 header->private_bits = 0;
48
49+ mad_bit_init(&bufend_ptr, stream->bufend);
50+
51 /* header() */
52+ if (mad_bit_length(&stream->ptr, &bufend_ptr) < 32) {
53+ stream->error = MAD_ERROR_BUFLEN;
54+ return -1;
55+ }
56
57 /* syncword */
58 mad_bit_skip(&stream->ptr, 11);
59@@ -225,8 +232,13 @@ int decode_header(struct mad_header *header, struct mad_stream *stream)
60 /* error_check() */
61
62 /* crc_check */
63- if (header->flags & MAD_FLAG_PROTECTION)
64+ if (header->flags & MAD_FLAG_PROTECTION) {
65+ if (mad_bit_length(&stream->ptr, &bufend_ptr) < 16) {
66+ stream->error = MAD_ERROR_BUFLEN;
67+ return -1;
68+ }
69 header->crc_target = mad_bit_read(&stream->ptr, 16);
70+ }
71
72 return 0;
73 }
74@@ -338,7 +350,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
75 stream->error = MAD_ERROR_BUFLEN;
76 goto fail;
77 }
78- else if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
79+ else if ((end - ptr >= 2) && !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
80 /* mark point where frame sync word was expected */
81 stream->this_frame = ptr;
82 stream->next_frame = ptr + 1;
83@@ -361,6 +373,8 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
84 ptr = mad_bit_nextbyte(&stream->ptr);
85 }
86
87+ stream->error = MAD_ERROR_NONE;
88+
89 /* begin processing */
90 stream->this_frame = ptr;
91 stream->next_frame = ptr + 1; /* possibly bogus sync word */
92@@ -413,7 +427,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
93 /* check that a valid frame header follows this frame */
94
95 ptr = stream->next_frame;
96- if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
97+ if ((end - ptr >= 2) && !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
98 ptr = stream->next_frame = stream->this_frame + 1;
99 goto sync;
100 }
101diff --git a/layer12.c b/layer12.c
102index 6981f9c..b6f4a2f 100644
103--- a/layer12.c
104+++ b/layer12.c
105@@ -72,10 +72,18 @@ mad_fixed_t const linear_table[14] = {
106 * DESCRIPTION: decode one requantized Layer I sample from a bitstream
107 */
108 static
109-mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb)
110+mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb, struct mad_stream *stream)
111 {
112 mad_fixed_t sample;
113+ struct mad_bitptr frameend_ptr;
114
115+ mad_bit_init(&frameend_ptr, stream->next_frame);
116+
117+ if (mad_bit_length(ptr, &frameend_ptr) < nb) {
118+ stream->error = MAD_ERROR_LOSTSYNC;
119+ stream->sync = 0;
120+ return 0;
121+ }
122 sample = mad_bit_read(ptr, nb);
123
124 /* invert most significant bit, extend sign, then scale to fixed format */
125@@ -106,6 +114,10 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
126 struct mad_header *header = &frame->header;
127 unsigned int nch, bound, ch, s, sb, nb;
128 unsigned char allocation[2][32], scalefactor[2][32];
129+ struct mad_bitptr bufend_ptr, frameend_ptr;
130+
131+ mad_bit_init(&bufend_ptr, stream->bufend);
132+ mad_bit_init(&frameend_ptr, stream->next_frame);
133
134 nch = MAD_NCHANNELS(header);
135
136@@ -118,6 +130,11 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
137 /* check CRC word */
138
139 if (header->flags & MAD_FLAG_PROTECTION) {
140+ if (mad_bit_length(&stream->ptr, &bufend_ptr)
141+ < 4 * (bound * nch + (32 - bound))) {
142+ stream->error = MAD_ERROR_BADCRC;
143+ return -1;
144+ }
145 header->crc_check =
146 mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)),
147 header->crc_check);
148@@ -133,6 +150,11 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
149
150 for (sb = 0; sb < bound; ++sb) {
151 for (ch = 0; ch < nch; ++ch) {
152+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 4) {
153+ stream->error = MAD_ERROR_LOSTSYNC;
154+ stream->sync = 0;
155+ return -1;
156+ }
157 nb = mad_bit_read(&stream->ptr, 4);
158
159 if (nb == 15) {
160@@ -145,6 +167,11 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
161 }
162
163 for (sb = bound; sb < 32; ++sb) {
164+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 4) {
165+ stream->error = MAD_ERROR_LOSTSYNC;
166+ stream->sync = 0;
167+ return -1;
168+ }
169 nb = mad_bit_read(&stream->ptr, 4);
170
171 if (nb == 15) {
172@@ -161,6 +188,11 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
173 for (sb = 0; sb < 32; ++sb) {
174 for (ch = 0; ch < nch; ++ch) {
175 if (allocation[ch][sb]) {
176+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) {
177+ stream->error = MAD_ERROR_LOSTSYNC;
178+ stream->sync = 0;
179+ return -1;
180+ }
181 scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6);
182
183 # if defined(OPT_STRICT)
184@@ -185,8 +217,10 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
185 for (ch = 0; ch < nch; ++ch) {
186 nb = allocation[ch][sb];
187 frame->sbsample[ch][s][sb] = nb ?
188- mad_f_mul(I_sample(&stream->ptr, nb),
189+ mad_f_mul(I_sample(&stream->ptr, nb, stream),
190 sf_table[scalefactor[ch][sb]]) : 0;
191+ if (stream->error != 0)
192+ return -1;
193 }
194 }
195
196@@ -194,7 +228,14 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
197 if ((nb = allocation[0][sb])) {
198 mad_fixed_t sample;
199
200- sample = I_sample(&stream->ptr, nb);
201+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nb) {
202+ stream->error = MAD_ERROR_LOSTSYNC;
203+ stream->sync = 0;
204+ return -1;
205+ }
206+ sample = I_sample(&stream->ptr, nb, stream);
207+ if (stream->error != 0)
208+ return -1;
209
210 for (ch = 0; ch < nch; ++ch) {
211 frame->sbsample[ch][s][sb] =
212@@ -280,13 +321,21 @@ struct quantclass {
213 static
214 void II_samples(struct mad_bitptr *ptr,
215 struct quantclass const *quantclass,
216- mad_fixed_t output[3])
217+ mad_fixed_t output[3], struct mad_stream *stream)
218 {
219 unsigned int nb, s, sample[3];
220+ struct mad_bitptr frameend_ptr;
221+
222+ mad_bit_init(&frameend_ptr, stream->next_frame);
223
224 if ((nb = quantclass->group)) {
225 unsigned int c, nlevels;
226
227+ if (mad_bit_length(ptr, &frameend_ptr) < quantclass->bits) {
228+ stream->error = MAD_ERROR_LOSTSYNC;
229+ stream->sync = 0;
230+ return;
231+ }
232 /* degrouping */
233 c = mad_bit_read(ptr, quantclass->bits);
234 nlevels = quantclass->nlevels;
235@@ -299,8 +348,14 @@ void II_samples(struct mad_bitptr *ptr,
236 else {
237 nb = quantclass->bits;
238
239- for (s = 0; s < 3; ++s)
240+ for (s = 0; s < 3; ++s) {
241+ if (mad_bit_length(ptr, &frameend_ptr) < nb) {
242+ stream->error = MAD_ERROR_LOSTSYNC;
243+ stream->sync = 0;
244+ return;
245+ }
246 sample[s] = mad_bit_read(ptr, nb);
247+ }
248 }
249
250 for (s = 0; s < 3; ++s) {
251@@ -336,6 +391,9 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
252 unsigned char const *offsets;
253 unsigned char allocation[2][32], scfsi[2][32], scalefactor[2][32][3];
254 mad_fixed_t samples[3];
255+ struct mad_bitptr frameend_ptr;
256+
257+ mad_bit_init(&frameend_ptr, stream->next_frame);
258
259 nch = MAD_NCHANNELS(header);
260
261@@ -402,13 +460,24 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
262 for (sb = 0; sb < bound; ++sb) {
263 nbal = bitalloc_table[offsets[sb]].nbal;
264
265- for (ch = 0; ch < nch; ++ch)
266+ for (ch = 0; ch < nch; ++ch) {
267+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nbal) {
268+ stream->error = MAD_ERROR_LOSTSYNC;
269+ stream->sync = 0;
270+ return -1;
271+ }
272 allocation[ch][sb] = mad_bit_read(&stream->ptr, nbal);
273+ }
274 }
275
276 for (sb = bound; sb < sblimit; ++sb) {
277 nbal = bitalloc_table[offsets[sb]].nbal;
278
279+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nbal) {
280+ stream->error = MAD_ERROR_LOSTSYNC;
281+ stream->sync = 0;
282+ return -1;
283+ }
284 allocation[0][sb] =
285 allocation[1][sb] = mad_bit_read(&stream->ptr, nbal);
286 }
287@@ -417,8 +486,14 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
288
289 for (sb = 0; sb < sblimit; ++sb) {
290 for (ch = 0; ch < nch; ++ch) {
291- if (allocation[ch][sb])
292+ if (allocation[ch][sb]) {
293+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 2) {
294+ stream->error = MAD_ERROR_LOSTSYNC;
295+ stream->sync = 0;
296+ return -1;
297+ }
298 scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2);
299+ }
300 }
301 }
302
303@@ -441,6 +516,11 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
304 for (sb = 0; sb < sblimit; ++sb) {
305 for (ch = 0; ch < nch; ++ch) {
306 if (allocation[ch][sb]) {
307+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) {
308+ stream->error = MAD_ERROR_LOSTSYNC;
309+ stream->sync = 0;
310+ return -1;
311+ }
312 scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6);
313
314 switch (scfsi[ch][sb]) {
315@@ -451,11 +531,21 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
316 break;
317
318 case 0:
319+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) {
320+ stream->error = MAD_ERROR_LOSTSYNC;
321+ stream->sync = 0;
322+ return -1;
323+ }
324 scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6);
325 /* fall through */
326
327 case 1:
328 case 3:
329+ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) {
330+ stream->error = MAD_ERROR_LOSTSYNC;
331+ stream->sync = 0;
332+ return -1;
333+ }
334 scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6);
335 }
336
337@@ -487,7 +577,9 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
338 if ((index = allocation[ch][sb])) {
339 index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1];
340
341- II_samples(&stream->ptr, &qc_table[index], samples);
342+ II_samples(&stream->ptr, &qc_table[index], samples, stream);
343+ if (stream->error != 0)
344+ return -1;
345
346 for (s = 0; s < 3; ++s) {
347 frame->sbsample[ch][3 * gr + s][sb] =
348@@ -505,7 +597,9 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
349 if ((index = allocation[0][sb])) {
350 index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1];
351
352- II_samples(&stream->ptr, &qc_table[index], samples);
353+ II_samples(&stream->ptr, &qc_table[index], samples, stream);
354+ if (stream->error != 0)
355+ return -1;
356
357 for (ch = 0; ch < nch; ++ch) {
358 for (s = 0; s < 3; ++s) {
359diff --git a/layer3.c b/layer3.c
360index 7dc4ca6..59a81ed 100644
361--- a/layer3.c
362+++ b/layer3.c
363@@ -598,7 +598,8 @@ enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch,
364 static
365 unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr,
366 struct channel *channel,
367- struct channel *gr1ch, int mode_extension)
368+ struct channel *gr1ch, int mode_extension,
369+ unsigned int bits_left, unsigned int *part2_length)
370 {
371 struct mad_bitptr start;
372 unsigned int scalefac_compress, index, slen[4], part, n, i;
373@@ -644,8 +645,12 @@ unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr,
374
375 n = 0;
376 for (part = 0; part < 4; ++part) {
377- for (i = 0; i < nsfb[part]; ++i)
378+ for (i = 0; i < nsfb[part]; ++i) {
379+ if (bits_left < slen[part])
380+ return MAD_ERROR_BADSCFSI;
381 channel->scalefac[n++] = mad_bit_read(ptr, slen[part]);
382+ bits_left -= slen[part];
383+ }
384 }
385
386 while (n < 39)
387@@ -690,7 +695,10 @@ unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr,
388 max = (1 << slen[part]) - 1;
389
390 for (i = 0; i < nsfb[part]; ++i) {
391+ if (bits_left < slen[part])
392+ return MAD_ERROR_BADSCFSI;
393 is_pos = mad_bit_read(ptr, slen[part]);
394+ bits_left -= slen[part];
395
396 channel->scalefac[n] = is_pos;
397 gr1ch->scalefac[n++] = (is_pos == max);
398@@ -703,7 +711,8 @@ unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr,
399 }
400 }
401
402- return mad_bit_length(&start, ptr);
403+ *part2_length = mad_bit_length(&start, ptr);
404+ return MAD_ERROR_NONE;
405 }
406
407 /*
408@@ -712,7 +721,8 @@ unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr,
409 */
410 static
411 unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel,
412- struct channel const *gr0ch, unsigned int scfsi)
413+ struct channel const *gr0ch, unsigned int scfsi,
414+ unsigned int bits_left, unsigned int *part2_length)
415 {
416 struct mad_bitptr start;
417 unsigned int slen1, slen2, sfbi;
418@@ -728,12 +738,20 @@ unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel,
419 sfbi = 0;
420
421 nsfb = (channel->flags & mixed_block_flag) ? 8 + 3 * 3 : 6 * 3;
422- while (nsfb--)
423+ while (nsfb--) {
424+ if (bits_left < slen1)
425+ return MAD_ERROR_BADSCFSI;
426 channel->scalefac[sfbi++] = mad_bit_read(ptr, slen1);
427+ bits_left -= slen1;
428+ }
429
430 nsfb = 6 * 3;
431- while (nsfb--)
432+ while (nsfb--) {
433+ if (bits_left < slen2)
434+ return MAD_ERROR_BADSCFSI;
435 channel->scalefac[sfbi++] = mad_bit_read(ptr, slen2);
436+ bits_left -= slen2;
437+ }
438
439 nsfb = 1 * 3;
440 while (nsfb--)
441@@ -745,8 +763,12 @@ unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel,
442 channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
443 }
444 else {
445- for (sfbi = 0; sfbi < 6; ++sfbi)
446+ for (sfbi = 0; sfbi < 6; ++sfbi) {
447+ if (bits_left < slen1)
448+ return MAD_ERROR_BADSCFSI;
449 channel->scalefac[sfbi] = mad_bit_read(ptr, slen1);
450+ bits_left -= slen1;
451+ }
452 }
453
454 if (scfsi & 0x4) {
455@@ -754,8 +776,12 @@ unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel,
456 channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
457 }
458 else {
459- for (sfbi = 6; sfbi < 11; ++sfbi)
460+ for (sfbi = 6; sfbi < 11; ++sfbi) {
461+ if (bits_left < slen1)
462+ return MAD_ERROR_BADSCFSI;
463 channel->scalefac[sfbi] = mad_bit_read(ptr, slen1);
464+ bits_left -= slen1;
465+ }
466 }
467
468 if (scfsi & 0x2) {
469@@ -763,8 +789,12 @@ unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel,
470 channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
471 }
472 else {
473- for (sfbi = 11; sfbi < 16; ++sfbi)
474+ for (sfbi = 11; sfbi < 16; ++sfbi) {
475+ if (bits_left < slen2)
476+ return MAD_ERROR_BADSCFSI;
477 channel->scalefac[sfbi] = mad_bit_read(ptr, slen2);
478+ bits_left -= slen2;
479+ }
480 }
481
482 if (scfsi & 0x1) {
483@@ -772,14 +802,19 @@ unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel,
484 channel->scalefac[sfbi] = gr0ch->scalefac[sfbi];
485 }
486 else {
487- for (sfbi = 16; sfbi < 21; ++sfbi)
488+ for (sfbi = 16; sfbi < 21; ++sfbi) {
489+ if (bits_left < slen2)
490+ return MAD_ERROR_BADSCFSI;
491 channel->scalefac[sfbi] = mad_bit_read(ptr, slen2);
492+ bits_left -= slen2;
493+ }
494 }
495
496 channel->scalefac[21] = 0;
497 }
498
499- return mad_bit_length(&start, ptr);
500+ *part2_length = mad_bit_length(&start, ptr);
501+ return MAD_ERROR_NONE;
502 }
503
504 /*
505@@ -933,19 +968,17 @@ static
506 enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
507 struct channel *channel,
508 unsigned char const *sfbwidth,
509- unsigned int part2_length)
510+ signed int part3_length)
511 {
512 signed int exponents[39], exp;
513 signed int const *expptr;
514 struct mad_bitptr peek;
515- signed int bits_left, cachesz;
516+ signed int bits_left, cachesz, fakebits;
517 register mad_fixed_t *xrptr;
518 mad_fixed_t const *sfbound;
519 register unsigned long bitcache;
520
521- bits_left = (signed) channel->part2_3_length - (signed) part2_length;
522- if (bits_left < 0)
523- return MAD_ERROR_BADPART3LEN;
524+ bits_left = part3_length;
525
526 III_exponents(channel, sfbwidth, exponents);
527
528@@ -956,8 +989,12 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
529 cachesz = mad_bit_bitsleft(&peek);
530 cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7;
531
532+ if (bits_left < cachesz) {
533+ cachesz = bits_left;
534+ }
535 bitcache = mad_bit_read(&peek, cachesz);
536 bits_left -= cachesz;
537+ fakebits = 0;
538
539 xrptr = &xr[0];
540
541@@ -986,7 +1023,7 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
542
543 big_values = channel->big_values;
544
545- while (big_values-- && cachesz + bits_left > 0) {
546+ while (big_values-- && cachesz + bits_left - fakebits > 0) {
547 union huffpair const *pair;
548 unsigned int clumpsz, value;
549 register mad_fixed_t requantized;
550@@ -1023,10 +1060,19 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
551 unsigned int bits;
552
553 bits = ((32 - 1 - 21) + (21 - cachesz)) & ~7;
554+ if (bits_left < bits) {
555+ bits = bits_left;
556+ }
557 bitcache = (bitcache << bits) | mad_bit_read(&peek, bits);
558 cachesz += bits;
559 bits_left -= bits;
560 }
561+ if (cachesz < 21) {
562+ unsigned int bits = 21 - cachesz;
563+ bitcache <<= bits;
564+ cachesz += bits;
565+ fakebits += bits;
566+ }
567
568 /* hcod (0..19) */
569
570@@ -1041,6 +1087,8 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
571 }
572
573 cachesz -= pair->value.hlen;
574+ if (cachesz < fakebits)
575+ return MAD_ERROR_BADHUFFDATA;
576
577 if (linbits) {
578 /* x (0..14) */
579@@ -1054,10 +1102,15 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
580
581 case 15:
582 if (cachesz < linbits + 2) {
583- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16);
584- cachesz += 16;
585- bits_left -= 16;
586+ unsigned int bits = 16;
587+ if (bits_left < 16)
588+ bits = bits_left;
589+ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits);
590+ cachesz += bits;
591+ bits_left -= bits;
592 }
593+ if (cachesz - fakebits < linbits)
594+ return MAD_ERROR_BADHUFFDATA;
595
596 value += MASK(bitcache, cachesz, linbits);
597 cachesz -= linbits;
598@@ -1074,6 +1127,8 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
599 }
600
601 x_final:
602+ if (cachesz - fakebits < 1)
603+ return MAD_ERROR_BADHUFFDATA;
604 xrptr[0] = MASK1BIT(bitcache, cachesz--) ?
605 -requantized : requantized;
606 }
607@@ -1089,10 +1144,15 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
608
609 case 15:
610 if (cachesz < linbits + 1) {
611- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16);
612- cachesz += 16;
613- bits_left -= 16;
614+ unsigned int bits = 16;
615+ if (bits_left < 16)
616+ bits = bits_left;
617+ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits);
618+ cachesz += bits;
619+ bits_left -= bits;
620 }
621+ if (cachesz - fakebits < linbits)
622+ return MAD_ERROR_BADHUFFDATA;
623
624 value += MASK(bitcache, cachesz, linbits);
625 cachesz -= linbits;
626@@ -1109,6 +1169,8 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
627 }
628
629 y_final:
630+ if (cachesz - fakebits < 1)
631+ return MAD_ERROR_BADHUFFDATA;
632 xrptr[1] = MASK1BIT(bitcache, cachesz--) ?
633 -requantized : requantized;
634 }
635@@ -1128,6 +1190,8 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
636 requantized = reqcache[value] = III_requantize(value, exp);
637 }
638
639+ if (cachesz - fakebits < 1)
640+ return MAD_ERROR_BADHUFFDATA;
641 xrptr[0] = MASK1BIT(bitcache, cachesz--) ?
642 -requantized : requantized;
643 }
644@@ -1146,6 +1210,8 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
645 requantized = reqcache[value] = III_requantize(value, exp);
646 }
647
648+ if (cachesz - fakebits < 1)
649+ return MAD_ERROR_BADHUFFDATA;
650 xrptr[1] = MASK1BIT(bitcache, cachesz--) ?
651 -requantized : requantized;
652 }
653@@ -1155,9 +1221,6 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
654 }
655 }
656
657- if (cachesz + bits_left < 0)
658- return MAD_ERROR_BADHUFFDATA; /* big_values overrun */
659-
660 /* count1 */
661 {
662 union huffquad const *table;
663@@ -1167,15 +1230,24 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
664
665 requantized = III_requantize(1, exp);
666
667- while (cachesz + bits_left > 0 && xrptr <= &xr[572]) {
668+ while (cachesz + bits_left - fakebits > 0 && xrptr <= &xr[572]) {
669 union huffquad const *quad;
670
671 /* hcod (1..6) */
672
673 if (cachesz < 10) {
674- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16);
675- cachesz += 16;
676- bits_left -= 16;
677+ unsigned int bits = 16;
678+ if (bits_left < 16)
679+ bits = bits_left;
680+ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits);
681+ cachesz += bits;
682+ bits_left -= bits;
683+ }
684+ if (cachesz < 10) {
685+ unsigned int bits = 10 - cachesz;
686+ bitcache <<= bits;
687+ cachesz += bits;
688+ fakebits += bits;
689 }
690
691 quad = &table[MASK(bitcache, cachesz, 4)];
692@@ -1188,6 +1260,11 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
693 MASK(bitcache, cachesz, quad->ptr.bits)];
694 }
695
696+ if (cachesz - fakebits < quad->value.hlen + quad->value.v
697+ + quad->value.w + quad->value.x + quad->value.y)
698+ /* We don't have enough bits to read one more entry, consider them
699+ * stuffing bits. */
700+ break;
701 cachesz -= quad->value.hlen;
702
703 if (xrptr == sfbound) {
704@@ -1236,22 +1313,8 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
705
706 xrptr += 2;
707 }
708-
709- if (cachesz + bits_left < 0) {
710-# if 0 && defined(DEBUG)
711- fprintf(stderr, "huffman count1 overrun (%d bits)\n",
712- -(cachesz + bits_left));
713-# endif
714-
715- /* technically the bitstream is misformatted, but apparently
716- some encoders are just a bit sloppy with stuffing bits */
717-
718- xrptr -= 4;
719- }
720 }
721
722- assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT);
723-
724 # if 0 && defined(DEBUG)
725 if (bits_left < 0)
726 fprintf(stderr, "read %d bits too many\n", -bits_left);
727@@ -2348,10 +2411,11 @@ void III_freqinver(mad_fixed_t sample[18][32], unsigned int sb)
728 */
729 static
730 enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame,
731- struct sideinfo *si, unsigned int nch)
732+ struct sideinfo *si, unsigned int nch, unsigned int md_len)
733 {
734 struct mad_header *header = &frame->header;
735 unsigned int sfreqi, ngr, gr;
736+ int bits_left = md_len * CHAR_BIT;
737
738 {
739 unsigned int sfreq;
740@@ -2383,6 +2447,7 @@ enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame,
741 for (ch = 0; ch < nch; ++ch) {
742 struct channel *channel = &granule->ch[ch];
743 unsigned int part2_length;
744+ unsigned int part3_length;
745
746 sfbwidth[ch] = sfbwidth_table[sfreqi].l;
747 if (channel->block_type == 2) {
748@@ -2391,18 +2456,30 @@ enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame,
749 }
750
751 if (header->flags & MAD_FLAG_LSF_EXT) {
752- part2_length = III_scalefactors_lsf(ptr, channel,
753+ error = III_scalefactors_lsf(ptr, channel,
754 ch == 0 ? 0 : &si->gr[1].ch[1],
755- header->mode_extension);
756+ header->mode_extension, bits_left, &part2_length);
757 }
758 else {
759- part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch],
760- gr == 0 ? 0 : si->scfsi[ch]);
761+ error = III_scalefactors(ptr, channel, &si->gr[0].ch[ch],
762+ gr == 0 ? 0 : si->scfsi[ch], bits_left, &part2_length);
763 }
764+ if (error)
765+ return error;
766
767- error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length);
768+ bits_left -= part2_length;
769+
770+ if (part2_length > channel->part2_3_length)
771+ return MAD_ERROR_BADPART3LEN;
772+
773+ part3_length = channel->part2_3_length - part2_length;
774+ if (part3_length > bits_left)
775+ return MAD_ERROR_BADPART3LEN;
776+
777+ error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part3_length);
778 if (error)
779 return error;
780+ bits_left -= part3_length;
781 }
782
783 /* joint stereo processing */
784@@ -2519,11 +2596,13 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame)
785 unsigned int nch, priv_bitlen, next_md_begin = 0;
786 unsigned int si_len, data_bitlen, md_len;
787 unsigned int frame_space, frame_used, frame_free;
788- struct mad_bitptr ptr;
789+ struct mad_bitptr ptr, bufend_ptr;
790 struct sideinfo si;
791 enum mad_error error;
792 int result = 0;
793
794+ mad_bit_init(&bufend_ptr, stream->bufend);
795+
796 /* allocate Layer III dynamic structures */
797
798 if (stream->main_data == 0) {
799@@ -2587,14 +2666,15 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame)
800 unsigned long header;
801
802 mad_bit_init(&peek, stream->next_frame);
803+ if (mad_bit_length(&peek, &bufend_ptr) >= 57) {
804+ header = mad_bit_read(&peek, 32);
805+ if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) {
806+ if (!(header & 0x00010000L)) /* protection_bit */
807+ mad_bit_skip(&peek, 16); /* crc_check */
808
809- header = mad_bit_read(&peek, 32);
810- if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) {
811- if (!(header & 0x00010000L)) /* protection_bit */
812- mad_bit_skip(&peek, 16); /* crc_check */
813-
814- next_md_begin =
815- mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8);
816+ next_md_begin =
817+ mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8);
818+ }
819 }
820
821 mad_bit_finish(&peek);
822@@ -2653,7 +2733,7 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame)
823 /* decode main_data */
824
825 if (result == 0) {
826- error = III_decode(&ptr, frame, &si, nch);
827+ error = III_decode(&ptr, frame, &si, nch, md_len);
828 if (error) {
829 stream->error = error;
830 result = -1;
diff --git a/meta-oe/recipes-multimedia/libmad/libmad_0.15.1b.bb b/meta-oe/recipes-multimedia/libmad/libmad_0.15.1b.bb
index e70c8e3ed1..0f89574b9a 100644
--- a/meta-oe/recipes-multimedia/libmad/libmad_0.15.1b.bb
+++ b/meta-oe/recipes-multimedia/libmad/libmad_0.15.1b.bb
@@ -16,12 +16,16 @@ SRC_URI = "https://downloads.sourceforge.net/mad/libmad-${PV}.tar.gz \
16 file://obsolete_automake_macros.patch \ 16 file://obsolete_automake_macros.patch \
17 file://automake-foreign.patch \ 17 file://automake-foreign.patch \
18 file://0001-configure-Respect-the-cflags-from-environment.patch \ 18 file://0001-configure-Respect-the-cflags-from-environment.patch \
19 file://CVE-2017-8372_CVE-2017-8373.patch \
20 file://CVE-2017-8374.patch \
19" 21"
20SRC_URI:append:toolchain-clang = " file://0004-Remove-clang-unsupported-compiler-flags.patch " 22SRC_URI:append:toolchain-clang = " file://0004-Remove-clang-unsupported-compiler-flags.patch "
21 23
22SRC_URI[sha256sum] = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690" 24SRC_URI[sha256sum] = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690"
23 25
24S = "${WORKDIR}/libmad-${PV}" 26CVE_PRODUCT:append = " mad_libmad"
27
28S = "${UNPACKDIR}/libmad-${PV}"
25 29
26inherit autotools pkgconfig 30inherit autotools pkgconfig
27 31
@@ -34,3 +38,6 @@ do_configure:prepend () {
34} 38}
35 39
36ARM_INSTRUCTION_SET = "arm" 40ARM_INSTRUCTION_SET = "arm"
41
42CVE_STATUS[CVE-2017-11552] = "cpe-incorrect: this CVE is for mpg321, not libmad"
43CVE_STATUS[CVE-2018-7263] = "cpe-incorrect: this CVE is for mpg321, not libmad"
diff --git a/meta-oe/recipes-multimedia/libmms/libmms_0.6.4.bb b/meta-oe/recipes-multimedia/libmms/libmms_0.6.4.bb
index 62c20c6122..9fcb8a1dc0 100644
--- a/meta-oe/recipes-multimedia/libmms/libmms_0.6.4.bb
+++ b/meta-oe/recipes-multimedia/libmms/libmms_0.6.4.bb
@@ -6,7 +6,6 @@ LICENSE = "LGPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=fad9b3332be894bab9bc501572864b29" 6LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=fad9b3332be894bab9bc501572864b29"
7 7
8SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz" 8SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz"
9SRC_URI[md5sum] = "d6b665b335a6360e000976e770da7691"
10SRC_URI[sha256sum] = "3c05e05aebcbfcc044d9e8c2d4646cd8359be39a3f0ba8ce4e72a9094bee704f" 9SRC_URI[sha256sum] = "3c05e05aebcbfcc044d9e8c2d4646cd8359be39a3f0ba8ce4e72a9094bee704f"
11 10
12inherit autotools pkgconfig 11inherit autotools pkgconfig
diff --git a/meta-oe/recipes-multimedia/libopus/libopus_1.5.2.bb b/meta-oe/recipes-multimedia/libopus/libopus_1.5.2.bb
index 02958ef023..642f34f71d 100644
--- a/meta-oe/recipes-multimedia/libopus/libopus_1.5.2.bb
+++ b/meta-oe/recipes-multimedia/libopus/libopus_1.5.2.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4b365c2155d66e550e1447075d6744a5"
11SRC_URI = "http://downloads.xiph.org/releases/opus/opus-${PV}.tar.gz" 11SRC_URI = "http://downloads.xiph.org/releases/opus/opus-${PV}.tar.gz"
12SRC_URI[sha256sum] = "65c1d2f78b9f2fb20082c38cbe47c951ad5839345876e46941612ee87f9a7ce1" 12SRC_URI[sha256sum] = "65c1d2f78b9f2fb20082c38cbe47c951ad5839345876e46941612ee87f9a7ce1"
13 13
14S = "${WORKDIR}/opus-${PV}" 14S = "${UNPACKDIR}/opus-${PV}"
15 15
16inherit autotools pkgconfig 16inherit autotools pkgconfig
17 17
diff --git a/meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb b/meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb
index 596c5fe86d..fb822d7a0e 100644
--- a/meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb
+++ b/meta-oe/recipes-multimedia/libopusenc/libopusenc_0.2.1.bb
@@ -8,12 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=174b92049c2c697eb73112801662a07c"
8 8
9DEPENDS = "libopus" 9DEPENDS = "libopus"
10 10
11UPSTREAM_CHECK_URI = "https://github.com/xiph/libopusenc/releases" 11UPSTREAM_CHECK_URI = "https://github.com/xiph/libopusenc/tags"
12UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)"
12 13
13SRC_URI = "https://ftp.osuosl.org/pub/xiph/releases/opus/libopusenc-${PV}.tar.gz" 14SRC_URI = "https://ftp.osuosl.org/pub/xiph/releases/opus/libopusenc-${PV}.tar.gz"
14SRC_URI[md5sum] = "f038ea0f4168d184c76b42d293697c57"
15SRC_URI[sha256sum] = "8298db61a8d3d63e41c1a80705baa8ce9ff3f50452ea7ec1c19a564fe106cbb9" 15SRC_URI[sha256sum] = "8298db61a8d3d63e41c1a80705baa8ce9ff3f50452ea7ec1c19a564fe106cbb9"
16 16
17S = "${WORKDIR}/libopusenc-${PV}" 17S = "${UNPACKDIR}/libopusenc-${PV}"
18 18
19inherit autotools pkgconfig 19inherit autotools pkgconfig
diff --git a/meta-oe/recipes-multimedia/libxmp/libxmp_4.6.3.bb b/meta-oe/recipes-multimedia/libxmp/libxmp_4.6.3.bb
new file mode 100644
index 0000000000..c302f65ed5
--- /dev/null
+++ b/meta-oe/recipes-multimedia/libxmp/libxmp_4.6.3.bb
@@ -0,0 +1,10 @@
1SUMMARY = "Extended Module Player Library"
2HOMEPAGE = "http://xmp.sourceforge.net/"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://README;beginline=59;md5=ea030bd80f99071b0d3f9a9f752d1ca8"
5
6inherit cmake pkgconfig
7
8SRC_URI = "git://github.com/libxmp/libxmp.git;protocol=https;branch=master;tag=libxmp-${PV}"
9SRCREV = "bed660f8e530d399c38f27a5a7732f4e79740585"
10
diff --git a/meta-oe/recipes-multimedia/live555/live555_20210824.bb b/meta-oe/recipes-multimedia/live555/live555_20210824.bb
index a899049b77..1622a97fe1 100644
--- a/meta-oe/recipes-multimedia/live555/live555_20210824.bb
+++ b/meta-oe/recipes-multimedia/live555/live555_20210824.bb
@@ -18,7 +18,7 @@ MIRRORS += "http://www.live555.com/liveMedia/public/ http://download.videolan.or
18 18
19SRC_URI[sha256sum] = "ce95a1c79f6d18e959f9dc129b8529b711c60e76754acc285e60946303b923ec" 19SRC_URI[sha256sum] = "ce95a1c79f6d18e959f9dc129b8529b711c60e76754acc285e60946303b923ec"
20 20
21S = "${WORKDIR}/live" 21S = "${UNPACKDIR}/live"
22 22
23LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ 23LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
24 file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02 \ 24 file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02 \
@@ -27,7 +27,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
27TARGET_CC_ARCH += "${LDFLAGS}" 27TARGET_CC_ARCH += "${LDFLAGS}"
28 28
29do_configure() { 29do_configure() {
30 cp ${WORKDIR}/config.linux-cross . 30 cp ${UNPACKDIR}/config.linux-cross .
31 echo "COMPILE_OPTS+=" -fPIC -DXLOCALE_NOT_USED"" >> config.linux-cross 31 echo "COMPILE_OPTS+=" -fPIC -DXLOCALE_NOT_USED"" >> config.linux-cross
32 ./genMakefiles linux-cross 32 ./genMakefiles linux-cross
33} 33}
diff --git a/meta-oe/recipes-multimedia/mikmod/libmikmod_3.3.11.1.bb b/meta-oe/recipes-multimedia/mikmod/libmikmod_3.3.11.1.bb
index e0712ba930..d7a2820a79 100644
--- a/meta-oe/recipes-multimedia/mikmod/libmikmod_3.3.11.1.bb
+++ b/meta-oe/recipes-multimedia/mikmod/libmikmod_3.3.11.1.bb
@@ -8,7 +8,6 @@ DEPENDS = "alsa-lib texinfo"
8SRC_URI = "\ 8SRC_URI = "\
9 ${SOURCEFORGE_MIRROR}/project/mikmod/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ 9 ${SOURCEFORGE_MIRROR}/project/mikmod/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
10" 10"
11SRC_URI[md5sum] = "f69d7dd06d307e888f466fc27f4f680b"
12SRC_URI[sha256sum] = "ad9d64dfc8f83684876419ea7cd4ff4a41d8bcd8c23ef37ecb3a200a16b46d19" 11SRC_URI[sha256sum] = "ad9d64dfc8f83684876419ea7cd4ff4a41d8bcd8c23ef37ecb3a200a16b46d19"
13 12
14inherit autotools binconfig lib_package 13inherit autotools binconfig lib_package
diff --git a/meta-oe/recipes-multimedia/mplayer/libplacebo_7.351.0.bb b/meta-oe/recipes-multimedia/mplayer/libplacebo_7.351.0.bb
new file mode 100644
index 0000000000..68a29dde91
--- /dev/null
+++ b/meta-oe/recipes-multimedia/mplayer/libplacebo_7.351.0.bb
@@ -0,0 +1,28 @@
1SUMMARY = "Reusable library for GPU-accelerated video/image rendering primitives"
2LICENSE = "LGPL-2.1-only"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=435ed639f84d4585d93824e7da3d85da"
4
5DEPENDS += "fastfloat glad-native python3-mako-native python3-jinja2-native vulkan-headers"
6
7SRC_URI = "git://code.videolan.org/videolan/libplacebo.git;protocol=https;branch=v7.351"
8SRCREV = "3188549fba13bbdf3a5a98de2a38c2e71f04e21e"
9
10inherit meson pkgconfig
11
12
13PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'vulkan opengl', d)} lcms"
14
15PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader shaderc spirv-shader-generator"
16PACKAGECONFIG[glslang] = "-Dglslang=enabled,-Dglslang=disabled,glslang"
17PACKAGECONFIG[opengl] = "-Dopengl=enabled,-Dopengl=disabled"
18PACKAGECONFIG[lcms] = "-Dlcms=enabled,-Dlcms=disabled,lcms"
19PACKAGECONFIG[demos] = "-Ddemos=true,-Ddemos=false,ffmpeg virtual/libsdl2 libsdl2-image"
20
21EXTRA_OEMESON = "-Dvulkan-registry=${STAGING_DATADIR}/vulkan/registry/vk.xml"
22
23do_install:append(){
24 if [ -f ${D}${libdir}/pkgconfig/libplacebo.pc ]; then
25 sed -i "s,${RECIPE_SYSROOT}${libdir}/libSPIRV.so,-lSPIRV,g" ${D}${libdir}/pkgconfig/libplacebo.pc
26 sed -i "s,${RECIPE_SYSROOT}${libdir}/libglslang.so,-lglslang,g" ${D}${libdir}/pkgconfig/libplacebo.pc
27 fi
28}
diff --git a/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb b/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb
deleted file mode 100644
index 0f50a6e8fe..0000000000
--- a/meta-oe/recipes-multimedia/mplayer/mpv_0.35.1.bb
+++ /dev/null
@@ -1,116 +0,0 @@
1SUMMARY = "Open Source multimedia player"
2DESCRIPTION = "mpv is a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more."
3SECTION = "multimedia"
4HOMEPAGE = "http://www.mpv.io/"
5
6DEPENDS = " \
7 zlib \
8 ffmpeg \
9 jpeg \
10 libv4l \
11 libass \
12"
13
14LICENSE = "GPL-2.0-or-later"
15LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
16
17SRCREV_mpv = "140ec21c89d671d392877a7f3b91d67e7d7b9239"
18SRC_URI = "git://github.com/mpv-player/mpv;name=mpv;branch=release/0.35;protocol=https \
19 https://waf.io/waf-2.0.25;name=waf;subdir=git \
20 "
21SRC_URI[waf.sha256sum] = "21199cd220ccf60434133e1fd2ab8c8e5217c3799199c82722543970dc8e38d5"
22
23S = "${WORKDIR}/git"
24
25inherit waf pkgconfig mime-xdg
26
27LDFLAGS:append:riscv64 = " -latomic"
28
29LUA ?= "lua"
30LUA:mips64 = ""
31LUA:powerpc64 = ""
32LUA:powerpc64le = ""
33LUA:riscv64 = ""
34LUA:riscv32 = ""
35LUA:powerpc = ""
36
37# Note: lua is required to get on-screen-display (controls)
38PACKAGECONFIG ??= " \
39 ${LUA} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
41 ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
42 ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)} \
43"
44
45PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 xsp libxv libxscrnsaver libxinerama libxpresent libxext"
46PACKAGECONFIG[xv] = "--enable-xv,--disable-xv,libxv"
47PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
48PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
49PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
50PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgbm"
51PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit"
52PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive"
53PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack"
54PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
55PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
56PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native libxkbcommon"
57
58python __anonymous() {
59 packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
60 extras = []
61 if "x11" in packageconfig and "opengl" in packageconfig:
62 extras.append(" --enable-gl-x11")
63 if "x11" in packageconfig and "egl" in packageconfig:
64 extras.append(" --enable-egl-x11")
65 if "egl" in packageconfig and "drm" in packageconfig:
66 extras.append(" --enable-egl-drm")
67 if "vaapi" in packageconfig and "x11" in packageconfig:
68 extras.append(" --enable-vaapi-x11")
69 if "vaapi" in packageconfig and "drm" in packageconfig:
70 extras.append(" --enable-vaapi-drm")
71 if "vaapi" in packageconfig and "x11" in packageconfig and "egl" in packageconfig:
72 extras.append(" --enable-vaapi-x-egl")
73 if "vdpau" in packageconfig and "opengl" in packageconfig and "x11" in packageconfig:
74 extras.append(" --enable-vdpau-gl-x11")
75 if "wayland" in packageconfig and "opengl" in packageconfig:
76 extras.append(" --enable-gl-wayland")
77 if "wayland" in packageconfig and "vaapi" in packageconfig:
78 extras.append(" --enable-vaapi-wayland")
79 if extras:
80 d.appendVar("EXTRA_OECONF", "".join(extras))
81}
82
83SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}"
84
85EXTRA_OECONF = " \
86 --prefix=${prefix} \
87 --target=${SIMPLE_TARGET_SYS} \
88 --confdir=${sysconfdir} \
89 --datadir=${datadir} \
90 --disable-manpage-build \
91 --disable-libbluray \
92 --disable-dvdnav \
93 --disable-cdda \
94 --disable-uchardet \
95 --disable-rubberband \
96 --disable-lcms2 \
97 --disable-vapoursynth \
98 ${PACKAGECONFIG_CONFARGS} \
99"
100
101do_configure:append() {
102 sed -i -e 's#${WORKDIR}#<WORKDIR>#g' ${B}/config.h
103}
104
105link_waf() {
106 ln -s waf-2.0.25 ${S}/waf
107}
108do_unpack[postfuncs] += "link_waf"
109
110FILES:${PN} += " \
111 ${datadir}/icons \
112 ${datadir}/zsh \
113 ${datadir}/bash-completion \
114 ${datadir}/metainfo \
115 "
116EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}"
diff --git a/meta-oe/recipes-multimedia/mplayer/mpv_0.40.0.bb b/meta-oe/recipes-multimedia/mplayer/mpv_0.40.0.bb
new file mode 100644
index 0000000000..3223dd69d7
--- /dev/null
+++ b/meta-oe/recipes-multimedia/mplayer/mpv_0.40.0.bb
@@ -0,0 +1,102 @@
1SUMMARY = "Open Source multimedia player"
2DESCRIPTION = "mpv is a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more."
3SECTION = "multimedia"
4HOMEPAGE = "http://www.mpv.io/"
5
6DEPENDS = " \
7 zlib \
8 ffmpeg \
9 jpeg \
10 libv4l \
11 libass \
12 libdisplay-info \
13 libplacebo \
14"
15
16LICENSE = "GPL-2.0-or-later"
17LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=570a9b3749dd0463a1778803b12a6dce"
18
19SRCREV = "e48ac7ce08462f5e33af6ef9deeac6fa87eef01e"
20SRC_URI = "git://github.com/mpv-player/mpv;name=mpv;branch=release/${@oe.utils.trim_version('${PV}', 2)};protocol=https"
21
22inherit meson pkgconfig mime-xdg
23
24LDFLAGS:append:riscv64 = " -latomic"
25
26LUA ?= "lua"
27LUA:mips64 = ""
28LUA:powerpc64 = ""
29LUA:powerpc64le = ""
30LUA:riscv64 = ""
31LUA:riscv32 = ""
32LUA:powerpc = ""
33
34# Note: lua is required to get on-screen-display (controls)
35PACKAGECONFIG ??= " \
36 libmpv \
37 ${LUA} \
38 ${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland opengl pipewire pulseaudio vulkan', d)} \
39 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'egl', '', d)} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'drm gbm', '', d)} \
41"
42
43PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 xsp libxv libxscrnsaver libxinerama libxpresent libxext"
44PACKAGECONFIG[xv] = "-Dxv=enabled,-Dxv=disabled,libxv"
45PACKAGECONFIG[opengl] = "-Dgl=enabled,-Dgl=disabled,virtual/libgl"
46PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
47PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,libdrm"
48PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled,virtual/libgbm"
49PACKAGECONFIG[lua] = "-Dlua=luajit,-Dlua=disabled,luajit"
50PACKAGECONFIG[libarchive] = "-Dlibarchive=enabled,-Dlibarchive=disabled,libarchive"
51PACKAGECONFIG[lcms2] = "-Dlcms2=enabled,-Dlcms2=disabled,lcms"
52PACKAGECONFIG[libmpv] = "-Dlibmpv=true,-Dlibmpv=false"
53PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack"
54PACKAGECONFIG[pipewire] = "-Dpipewire=enabled,-Dpipewire=disabled,pipewire"
55PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
56PACKAGECONFIG[vaapi] = "-Dvaapi=enabled,-Dvaapi=disabled,libva"
57PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers"
58PACKAGECONFIG[vdpau] = "-Dvdpau=enabled,-Dvdpau=disabled,libvdpau nv-codec-headers"
59PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland wayland-native libxkbcommon"
60
61python __anonymous() {
62 packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
63 extras = []
64 if "x11" in packageconfig and "opengl" in packageconfig:
65 extras.append(" -Dgl-x11=enabled")
66 if "x11" in packageconfig and "egl" in packageconfig:
67 extras.append(" -Degl-x11=enabled")
68 if "egl" in packageconfig and "drm" in packageconfig:
69 extras.append(" -Degl-drm=enabled")
70 if "vaapi" in packageconfig and "x11" in packageconfig:
71 extras.append(" -Dvaapi-x11=enabled")
72 if "vaapi" in packageconfig and "drm" in packageconfig:
73 extras.append(" -Dvaapi-drm=enabled")
74 if "vdpau" in packageconfig and "opengl" in packageconfig and "x11" in packageconfig:
75 extras.append(" -Dvdpau-gl-x11=enabled")
76 if "wayland" in packageconfig and "opengl" in packageconfig:
77 extras.append(" -Degl-wayland=enabled")
78 if "wayland" in packageconfig and "vaapi" in packageconfig:
79 extras.append(" -Dvaapi-wayland=enabled")
80 if extras:
81 d.appendVar("EXTRA_OEMESON", "".join(extras))
82}
83
84#SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}"
85
86EXTRA_OEMESON = " \
87 -Dmanpage-build=disabled \
88 -Dlibbluray=disabled \
89 -Ddvdnav=disabled \
90 -Dcdda=disabled \
91 -Duchardet=disabled \
92 -Drubberband=disabled \
93 -Dvapoursynth=disabled \
94 -Dshaderc=disabled \
95"
96
97do_configure:append() {
98 sed -i -e 's#${WORKDIR}#<WORKDIR>#g' ${B}/config.h
99}
100
101FILES:${PN} += "${datadir}"
102EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}"
diff --git a/meta-oe/recipes-multimedia/pulseaudio/pavucontrol_5.0.bb b/meta-oe/recipes-multimedia/pulseaudio/pavucontrol_5.0.bb
index 012fc3a94d..29500bdb94 100644
--- a/meta-oe/recipes-multimedia/pulseaudio/pavucontrol_5.0.bb
+++ b/meta-oe/recipes-multimedia/pulseaudio/pavucontrol_5.0.bb
@@ -14,7 +14,7 @@ inherit autotools features_check perlnative pkgconfig
14 14
15ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" 15ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
16 16
17SRC_URI = "http://freedesktop.org/software/pulseaudio/${BPN}/${BP}.tar.xz" 17SRC_URI = "http://www.freedesktop.org/software/pulseaudio/${BPN}/${BP}.tar.xz"
18SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-pavucontrol-remove-canberra-gtk-support.patch', '', d)}" 18SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'file://0001-pavucontrol-remove-canberra-gtk-support.patch', '', d)}"
19 19
20SRC_URI[sha256sum] = "ce2b72c3b5f1a70ad0df19dd81750f9455bd20870d1d3a36d20536af2e8f4e7a" 20SRC_URI[sha256sum] = "ce2b72c3b5f1a70ad0df19dd81750f9455bd20870d1d3a36d20536af2e8f4e7a"
diff --git a/meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb b/meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb
index 87320a98e8..ed9f561a5e 100644
--- a/meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb
+++ b/meta-oe/recipes-multimedia/sound-themes/sound-theme-freedesktop_0.8.bb
@@ -11,6 +11,5 @@ inherit autotools gettext
11 11
12DEPENDS += "glib-2.0-native" 12DEPENDS += "glib-2.0-native"
13 13
14SRC_URI = "http://people.freedesktop.org/~mccann/dist/${BPN}-${PV}.tar.bz2" 14SRC_URI = "https://people.freedesktop.org/~mccann/dist/${BPN}-${PV}.tar.bz2"
15SRC_URI[md5sum] = "d7387912cfd275282d1ec94483cb2f62"
16SRC_URI[sha256sum] = "cb518b20eef05ec2e82dda1fa89a292c1760dc023aba91b8aa69bafac85e8a14" 15SRC_URI[sha256sum] = "cb518b20eef05ec2e82dda1fa89a292c1760dc023aba91b8aa69bafac85e8a14"
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch
deleted file mode 100644
index 64c01e4977..0000000000
--- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 502c0302827cec3d2b2a69fb25189646685ef2ff Mon Sep 17 00:00:00 2001
2From: Fabio Estevam <festevam@denx.de>
3Date: Fri, 12 Jan 2024 00:17:14 -0300
4Subject: [PATCH] keytable: meson: Restrict the installation of
5 50-rc_keymap.conf
6
7Currently, meson tries to install 50-rc_keymap.conf even if systemd
8is not used.
9
10Commit 01f2c6c58e6f ("keytable: restrict installation of 50-rc_keymap.conf"),
11only allowed 50-rc_keymap.conf to be installed when both BPF and systemd
12were used.
13
14Apply the same logic in meson to fix the problem.
15
16Signed-off-by: Fabio Estevam <festevam@denx.de>
17Signed-off-by: Sean Young <sean@mess.org>
18Upstream-Status: Backport [https://git.linuxtv.org/v4l-utils.git/commit/?id=a21924ec424c4744af6f2a794e0677eba35dd168]
19---
20 utils/keytable/meson.build | 4 ++++
21 1 file changed, 4 insertions(+)
22
23diff --git a/utils/keytable/meson.build b/utils/keytable/meson.build
24index 4130a4bea514..76ce329eae8e 100644
25--- a/utils/keytable/meson.build
26+++ b/utils/keytable/meson.build
27@@ -69,6 +69,8 @@ ir_keytable_udev_rules = files(
28 install_data(ir_keytable_udev_rules,
29 install_dir : ir_keytable_system_dir / 'rules.d')
30
31+if ir_bpf_enabled
32+if dep_systemd.found()
33 if have_udevdsyscallfilter
34 ir_keytable_systemd_files = files(
35 '50-rc_keymap.conf',
36@@ -76,6 +78,8 @@ if have_udevdsyscallfilter
37 install_data(ir_keytable_systemd_files,
38 install_dir : systemd_systemdir / 'systemd-udevd.service.d')
39 endif
40+endif
41+endif
42
43 # Install non-existing directory to create empty directory structure
44 # See: https://github.com/mesonbuild/meson/issues/2904
45--
462.34.1
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-media-ctl-Install-media-ctl-header-and-library-files.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-media-ctl-Install-media-ctl-header-and-library-files.patch
new file mode 100644
index 0000000000..6c946d8c48
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-media-ctl-Install-media-ctl-header-and-library-files.patch
@@ -0,0 +1,78 @@
1From 3867fcfa4389c7fa271705f1fd1d4bfb74bc1bd1 Mon Sep 17 00:00:00 2001
2From: Neel Gandhi <neel.gandhi@amd.com>
3Date: Wed, 5 Jun 2024 13:51:36 +0530
4Subject: [PATCH] media-ctl: Install media-ctl header and library files
5
6Install mediactl and v4l2subdev header and library
7files, which may be required by 3rd party applications
8to populate and control v4l2subdev device node tree
9
10Install of these files was removed in upstream commit
110911dce53b08b0df3066be2c75f67e8a314d8729.
12
13Upstream-Status: Denied
14
15v4l-utils maintainers do not promise a stable API for this library, and
16do not currently have the time to do so. So exporting the API in this
17way is fine, as long as we understand that it will change and users of
18the API will need to adapt over time.
19
20Signed-off-by: Neel Gandhi <neel.gandhi@amd.com>
21Signed-off-by: Mark Hatle <mark.hatle@amd.com>
22---
23 utils/media-ctl/meson.build | 28 +++++++++++++++++++++-------
24 1 file changed, 21 insertions(+), 7 deletions(-)
25
26diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
27index 3a7b0c9a..40669b4c 100644
28--- a/utils/media-ctl/meson.build
29+++ b/utils/media-ctl/meson.build
30@@ -3,14 +3,24 @@ libmediactl_sources = files(
31 'mediactl-priv.h',
32 )
33
34+libmediactl_api = files(
35+ 'mediactl.h',
36+ 'v4l2subdev.h',
37+)
38+
39+install_headers(libmediactl_api, subdir: 'mediactl')
40+
41 libmediactl_deps = [
42 dep_libudev,
43 ]
44
45-libmediactl = static_library('mediactl',
46- libmediactl_sources,
47- dependencies : libmediactl_deps,
48- include_directories : v4l2_utils_incdir)
49+libmediactl = library('mediactl',
50+ libmediactl_sources,
51+ soversion: '0',
52+ version: '0.0.0',
53+ install : true,
54+ dependencies : libmediactl_deps,
55+ include_directories : v4l2_utils_incdir)
56
57 dep_libmediactl = declare_dependency(link_with : libmediactl)
58
59@@ -18,9 +28,13 @@ libv4l2subdev_sources = files('libv4l2subdev.c')
60 libv4l2subdev_sources += media_bus_format_names_h
61 libv4l2subdev_sources += media_bus_format_codes_h
62
63-libv4l2subdev = static_library('v4l2subdev',
64- libv4l2subdev_sources,
65- include_directories : v4l2_utils_incdir)
66+libv4l2subdev = library('v4l2subdev',
67+ libv4l2subdev_sources,
68+ soversion: '0',
69+ version: '0.0.0',
70+ install : true,
71+ dependencies : dep_libmediactl,
72+ include_directories : v4l2_utils_incdir)
73
74 dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
75
76--
772.34.1
78
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-media-ctl-Install-media-ctl-pkg-config-files.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-media-ctl-Install-media-ctl-pkg-config-files.patch
new file mode 100644
index 0000000000..8a009ae806
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-media-ctl-Install-media-ctl-pkg-config-files.patch
@@ -0,0 +1,49 @@
1From a422ddf7f8805d34ff1fbb46d335993c9cd05ead Mon Sep 17 00:00:00 2001
2From: Einar Jon Gunnarsson <tolvupostur@gmail.com>
3Date: Fri, 10 May 2024 11:56:17 +0200
4Subject: [PATCH] media-ctl: Install media-ctl pkg-config files
5
6libv4l2subdev/libmediactl can not be used in projects without the
7pkg-config files. This adds them as well.
8
9Upstream-Status: Denied
10
11This is an add-on to the previous patch:
120001-media-ctl-Install-media-ctl-header-and-library-files.patch
13so same restrictions apply.
14
15Signed-off-by: Einar Jon Gunnarsson <tolvupostur@gmail.com>
16---
17 utils/media-ctl/meson.build | 12 ++++++++++++
18 1 file changed, 12 insertions(+)
19
20diff --git a/utils/media-ctl/meson.build b/utils/media-ctl/meson.build
21index 40669b4c..6feba1af 100644
22--- a/utils/media-ctl/meson.build
23+++ b/utils/media-ctl/meson.build
24@@ -38,6 +38,12 @@ libv4l2subdev = library('v4l2subdev',
25
26 dep_libv4l2subdev = declare_dependency(link_with : libv4l2subdev)
27
28+pkg.generate(
29+ libv4l2subdev,
30+ name : 'libv4l2subdev',
31+ version : meson.project_version(),
32+ description : 'v4l2 subdev library')
33+
34 media_ctl_sources = files(
35 'media-ctl.c',
36 'options.c',
37@@ -55,3 +61,9 @@ media_ctl = executable('media-ctl',
38 dependencies : media_ctl_deps,
39 install : true,
40 include_directories : v4l2_utils_incdir)
41+
42+pkg.generate(
43+ libmediactl,
44+ name : 'libmediactl',
45+ version : meson.project_version(),
46+ description : 'v4l2 mediactl library')
47--
482.43.5
49
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.26.1.bb b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.28.1.bb
index 52759ef18e..0a3b5d28b6 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.26.1.bb
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.28.1.bb
@@ -26,15 +26,15 @@ PACKAGECONFIG[qvidcap] = ",-Dqvidcap=disabled"
26PACKAGECONFIG[v4l2-tracer] = ",-Dv4l2-tracer=disabled,json-c" 26PACKAGECONFIG[v4l2-tracer] = ",-Dv4l2-tracer=disabled,json-c"
27 27
28SRC_URI = "\ 28SRC_URI = "\
29 git://git.linuxtv.org/v4l-utils.git;protocol=https;branch=stable-1.26 \ 29 git://git.linuxtv.org/v4l-utils.git;protocol=https;branch=stable-1.28 \
30 file://0001-keytable-meson-Restrict-the-installation-of-50-rc_ke.patch \ 30 file://0001-media-ctl-Install-media-ctl-header-and-library-files.patch \
31 file://0002-media-ctl-Install-media-ctl-pkg-config-files.patch \
31" 32"
32 33
33SRCREV = "4aee01a027923cab1e40969f56f8ba58d3e6c0d1" 34SRCREV = "fc15e229d9d337e46d730f00647821adbbd58548"
34 35
35PV .= "+git"
36 36
37S = "${WORKDIR}/git" 37UPSTREAM_CHECK_GITTAGREGEX = "v4l-utils-(?P<pver>\d+(\.\d+)+)"
38 38
39EXTRA_OEMESON = "-Dudevdir=${base_libdir}/udev -Dv4l2-compliance-32=false -Dv4l2-ctl-32=false" 39EXTRA_OEMESON = "-Dudevdir=${base_libdir}/udev -Dv4l2-compliance-32=false -Dv4l2-ctl-32=false"
40 40
diff --git a/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb b/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb
index 3069528301..87dc7a7be6 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb
+++ b/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb
@@ -2,23 +2,13 @@ SUMMARY = "Yet Another V4L2 Test Application"
2LICENSE = "GPL-2.0-only" 2LICENSE = "GPL-2.0-only"
3LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" 3LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
4 4
5SRC_URI = "git://git.ideasonboard.org/yavta.git;branch=master \ 5SRC_URI = "git://git.ideasonboard.org/yavta.git;branch=master;protocol=https \
6 " 6 "
7SRCREV = "65f740aa1758531fd810339bc1b7d1d33666e28a" 7SRCREV = "52c975e5542504ac10bed8b1d68df5c75951d202"
8 8
9PV = "0.0" 9PV = "0.0"
10S = "${WORKDIR}/git"
11
12EXTRA_OEMAKE = "-e MAKEFLAGS="
13
14# The yavta sources include copies of the headers required to build in the
15# include directory. The Makefile uses CFLAGS to include these, but since
16# we override the CFLAGS then we need to add this include path back in.
17CFLAGS += "-I${S}/include"
18
19do_install() {
20 install -d ${D}${bindir}
21 install -m 0755 yavta ${D}${bindir}
22}
23 10
11# Upstream repo does not tag
12UPSTREAM_CHECK_COMMITS = "1"
24 13
14inherit meson
diff --git a/meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb b/meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb
index 7384d2892f..651fbc4192 100644
--- a/meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb
+++ b/meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb
@@ -11,7 +11,6 @@ SRC_URI = "git://github.com/dbry/WavPack.git;branch=master;protocol=https \
11 11
12SRCREV = "e03e8e29dc618e08e7baba9636e57ba1254874ce" 12SRCREV = "e03e8e29dc618e08e7baba9636e57ba1254874ce"
13 13
14S = "${WORKDIR}/git"
15 14
16inherit cmake pkgconfig lib_package 15inherit cmake pkgconfig lib_package
17 16
diff --git a/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch b/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch
index 463651aa4a..04c4804c05 100644
--- a/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch
+++ b/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch
@@ -1,4 +1,4 @@
1From 2829e6998b7595dd2108c1497fdd02485ef99e2c Mon Sep 17 00:00:00 2001 1From c71898649e300d7e5700cd247d7ae994c7faa406 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net> 2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 16 Aug 2011 16:04:35 +0200 3Date: Tue, 16 Aug 2011 16:04:35 +0200
4Subject: [PATCH] Upstream: not yet 4Subject: [PATCH] Upstream: not yet
@@ -11,10 +11,10 @@ Upstream-Status: Pending
11 1 file changed, 16 insertions(+), 4 deletions(-) 11 1 file changed, 16 insertions(+), 4 deletions(-)
12 12
13diff --git a/build/make/configure.sh b/build/make/configure.sh 13diff --git a/build/make/configure.sh b/build/make/configure.sh
14index b645a666f..0b99a8b38 100644 14index 8220d5cbe..923daf8bc 100644
15--- a/build/make/configure.sh 15--- a/build/make/configure.sh
16+++ b/build/make/configure.sh 16+++ b/build/make/configure.sh
17@@ -658,6 +658,8 @@ process_common_cmdline() { 17@@ -699,6 +699,8 @@ process_common_cmdline() {
18 ;; 18 ;;
19 --prefix=*) 19 --prefix=*)
20 prefix="${optval}" 20 prefix="${optval}"
@@ -23,7 +23,7 @@ index b645a666f..0b99a8b38 100644
23 ;; 23 ;;
24 --libdir=*) 24 --libdir=*)
25 libdir="${optval}" 25 libdir="${optval}"
26@@ -687,13 +689,23 @@ process_cmdline() { 26@@ -728,13 +730,23 @@ process_cmdline() {
27 } 27 }
28 28
29 post_process_common_cmdline() { 29 post_process_common_cmdline() {
diff --git a/meta-oe/recipes-multimedia/webm/libvpx_1.14.0.bb b/meta-oe/recipes-multimedia/webm/libvpx_1.15.2.bb
index b4d49842ea..a7cd76e0c7 100644
--- a/meta-oe/recipes-multimedia/webm/libvpx_1.14.0.bb
+++ b/meta-oe/recipes-multimedia/webm/libvpx_1.15.2.bb
@@ -7,12 +7,11 @@ LICENSE = "BSD-3-Clause"
7 7
8LIC_FILES_CHKSUM = "file://LICENSE;md5=d5b04755015be901744a78cc30d390d4" 8LIC_FILES_CHKSUM = "file://LICENSE;md5=d5b04755015be901744a78cc30d390d4"
9 9
10SRCREV = "602e2e8979d111b02c959470da5322797dd96a19" 10SRCREV = "d168454ecd099805c675d4a98c66f4891373302a"
11SRC_URI += "git://chromium.googlesource.com/webm/libvpx;protocol=https;branch=main \ 11SRC_URI += "git://chromium.googlesource.com/webm/libvpx;protocol=https;branch=main;tag=v${PV} \
12 file://libvpx-configure-support-blank-prefix.patch \ 12 file://libvpx-configure-support-blank-prefix.patch \
13 " 13 "
14 14
15S = "${WORKDIR}/git"
16 15
17# ffmpeg links with this and fails 16# ffmpeg links with this and fails
18# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4' 17# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'
diff --git a/meta-oe/recipes-multimedia/xpext/xpext_1.0-5.bb b/meta-oe/recipes-multimedia/xpext/xpext_1.0-5.bb
index f900aca2d4..5023e4e842 100644
--- a/meta-oe/recipes-multimedia/xpext/xpext_1.0-5.bb
+++ b/meta-oe/recipes-multimedia/xpext/xpext_1.0-5.bb
@@ -1,4 +1,4 @@
1LICENSE= "MIT" 1LICENSE = "MIT"
2SUMMARY = "X Server Nokia 770 extensions library" 2SUMMARY = "X Server Nokia 770 extensions library"
3SECTION = "x11/libs" 3SECTION = "x11/libs"
4DEPENDS = "virtual/libx11 libxext" 4DEPENDS = "virtual/libx11 libxext"
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=db043791349ba57ad1169e1c92477cb6"
7 7
8SRC_URI = "http://repository.maemo.org/pool/maemo/ossw/source/x/${BPN}/${BPN}_${PV}.tar.gz \ 8SRC_URI = "http://repository.maemo.org/pool/maemo/ossw/source/x/${BPN}/${BPN}_${PV}.tar.gz \
9 file://auxdir.patch;striplevel=0" 9 file://auxdir.patch;striplevel=0"
10S = "${WORKDIR}/xpext-1.0" 10S = "${UNPACKDIR}/xpext-1.0"
11 11
12inherit autotools pkgconfig features_check 12inherit autotools pkgconfig features_check
13# depends on virtual/libx11 13# depends on virtual/libx11
@@ -16,5 +16,4 @@ REQUIRED_DISTRO_FEATURES = "x11"
16# Remove runtime dependency on empty package ${PN} 16# Remove runtime dependency on empty package ${PN}
17RDEPENDS:${PN}-dev = "" 17RDEPENDS:${PN}-dev = ""
18 18
19SRC_URI[md5sum] = "1b0cb67b6f2bd7c4abef17648b062896"
20SRC_URI[sha256sum] = "a3b06f5188fd9effd0799ae31352b3cd65cb913b964e2c1a923ffa9d3c08abbe" 19SRC_URI[sha256sum] = "a3b06f5188fd9effd0799ae31352b3cd65cb913b964e2c1a923ffa9d3c08abbe"
diff --git a/meta-oe/recipes-multimedia/xsp/xsp/0001-fix-incompatible-pointer-types-build-error-in-gcc-15.patch b/meta-oe/recipes-multimedia/xsp/xsp/0001-fix-incompatible-pointer-types-build-error-in-gcc-15.patch
new file mode 100644
index 0000000000..ffb1089423
--- /dev/null
+++ b/meta-oe/recipes-multimedia/xsp/xsp/0001-fix-incompatible-pointer-types-build-error-in-gcc-15.patch
@@ -0,0 +1,40 @@
1From e001efa4a50e43fca5d8918ee05a3bc37180262d Mon Sep 17 00:00:00 2001
2From: "mark.yang" <mark.yang@lge.com>
3Date: Thu, 24 Apr 2025 18:10:25 +0900
4Subject: [PATCH] fix incompatible-pointer-types build error in gcc 15
5
6../Xsp/Xsp.c:37:9: error: initialization of 'int (*)(Display *, XExtCodes *)' from incompatible pointer type 'int (*)(void)' [-Wincompatible-pointer-types]
7 37 | XSPCloseDisplay, /* close_display */
8 | ^~~~~~~~~~~~~~~
9../Xsp/Xsp.c:37:9: note: (near initialization for 'xsp_extension_hooks.close_display')
10../Xsp/Xsp.c:23:12: note: 'XSPCloseDisplay' declared here
11 23 | static int XSPCloseDisplay();
12 | ^~~~~~~~~~~~~~~
13In file included from ../Xsp/Xsp.c:6:
14../Xsp/Xsp.c:49:37: error: conflicting types for 'XSPCloseDisplay'; have 'int(Display *, XExtCodes *)'
15 49 | static XEXT_GENERATE_CLOSE_DISPLAY (XSPCloseDisplay, xsp_info)
16 | ^~~~~~~~~~~~~~~
17../Xsp/Xsp.c:36:9: error: 'XSPCloseDisplay' undeclared here (not in a function); did you mean 'XCloseDisplay'?
18 36 | XSPCloseDisplay, /* close_display */
19 | ^~~~~~~~~~~~~~~
20 | XCloseDisplay
21
22Upstream-Status: Inactive-Upstream [seems to be unmaintained]
23Signed-off-by: mark.yang <mark.yang@lge.com>
24---
25 Xsp.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28diff --git a/Xsp.c b/Xsp.c
29index 28e2d6e..9bcc958 100644
30--- a/Xsp.c
31+++ b/Xsp.c
32@@ -20,7 +20,7 @@ static XExtensionInfo _xsp_info_data;
33 static XExtensionInfo *xsp_info = &_xsp_info_data;
34 static /* const */ char *xsp_extension_name = XSP_NAME;
35
36-static int XSPCloseDisplay();
37+static XEXT_CLOSE_DISPLAY_PROTO(XSPCloseDisplay);
38 static Bool XSPWireToEvent(Display *dpy, XEvent *event, xEvent *wire);
39
40 static Status XSPEventToWire(Display *dpy, XEvent *event, xEvent *wire);
diff --git a/meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb b/meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb
index c611da48c0..5350cf1c65 100644
--- a/meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb
+++ b/meta-oe/recipes-multimedia/xsp/xsp_1.0.0-8.bb
@@ -1,15 +1,18 @@
1LICENSE= "MIT" 1LICENSE = "MIT"
2SUMMARY = "X Server Nokia 770 extensions library" 2SUMMARY = "X Server Nokia 770 extensions library"
3SECTION = "x11/libs" 3SECTION = "x11/libs"
4DEPENDS = "virtual/libx11 libxext xpext" 4DEPENDS = "virtual/libx11 libxext xpext"
5LIC_FILES_CHKSUM = "file://COPYING;md5=ea2bda168c508c7cd8afa567b2fcc549" 5LIC_FILES_CHKSUM = "file://COPYING;md5=ea2bda168c508c7cd8afa567b2fcc549"
6SRC_URI = "http://repository.maemo.org/pool/maemo/ossw/source/x/xsp/${BPN}_${PV}.tar.gz \ 6SRC_URI = "http://repository.maemo.org/pool/maemo/ossw/source/x/xsp/${BPN}_${PV}.tar.gz \
7 file://xsp-fix-pc.patch" 7 file://xsp-fix-pc.patch \
8S = "${WORKDIR}/Xsp" 8 file://0001-fix-incompatible-pointer-types-build-error-in-gcc-15.patch \
9"
10S = "${UNPACKDIR}/Xsp"
9 11
10inherit autotools pkgconfig features_check 12inherit autotools pkgconfig features_check
11# depends on virtual/libx11 13# depends on virtual/libx11
12REQUIRED_DISTRO_FEATURES = "x11" 14REQUIRED_DISTRO_FEATURES = "x11"
13 15
14SRC_URI[md5sum] = "2a0d8d02228d4cbd28b6e07bb7c17cf5"
15SRC_URI[sha256sum] = "8b722b952b64841d996c70c3278499886c81bb5012991beed5f66f4158418f59" 16SRC_URI[sha256sum] = "8b722b952b64841d996c70c3278499886c81bb5012991beed5f66f4158418f59"
17
18CVE_STATUS[CVE-2006-2658] = "cpe-incorrect: The recipe used in the `meta-openembedded` is a different xsp package compared to the one which has the CVE issue."