diff options
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg')
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch | 52 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch | 97 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-35964.patch | 75 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-35965.patch | 35 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch | 32 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb (renamed from meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.1.bb) | 137 |
6 files changed, 75 insertions, 353 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch deleted file mode 100644 index 7635c9196a..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From aebb72e025cbfbd4a6765354f6f565ad4ac89789 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jun Zhao <barryjzhao@tencent.com> | ||
3 | Date: Sun, 12 Jul 2020 05:48:48 +0800 | ||
4 | Subject: [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1 | ||
5 | |||
6 | lavf/srt: fix build fail when used the libsrt 1.4.1 | ||
7 | |||
8 | libsrt changed the: | ||
9 | SRTO_SMOOTHER -> SRTO_CONGESTION | ||
10 | SRTO_STRICTENC -> SRTO_ENFORCEDENCRYPTION | ||
11 | and removed the front of deprecated options (SRTO_SMOOTHER/SRTO_STRICTENC) | ||
12 | in the header, it's lead to build fail | ||
13 | |||
14 | fix #8760 | ||
15 | |||
16 | Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315] | ||
17 | |||
18 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | ||
19 | Signed-off-by: Jun Zhao <barryjzhao@tencent.com> | ||
20 | --- | ||
21 | libavformat/libsrt.c | 8 ++++++++ | ||
22 | 1 file changed, 8 insertions(+) | ||
23 | |||
24 | diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c | ||
25 | index 4de575b..4719ce0 100644 | ||
26 | --- a/libavformat/libsrt.c | ||
27 | +++ b/libavformat/libsrt.c | ||
28 | @@ -313,8 +313,12 @@ static int libsrt_set_options_pre(URLContext *h, int fd) | ||
29 | (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) || | ||
30 | (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) || | ||
31 | #if SRT_VERSION_VALUE >= 0x010302 | ||
32 | +#if SRT_VERSION_VALUE >= 0x010401 | ||
33 | + (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || | ||
34 | +#else | ||
35 | /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */ | ||
36 | (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || | ||
37 | +#endif | ||
38 | (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) || | ||
39 | (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) || | ||
40 | #endif | ||
41 | @@ -333,7 +337,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd) | ||
42 | (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) || | ||
43 | (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) || | ||
44 | (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) || | ||
45 | +#if SRT_VERSION_VALUE >= 0x010401 | ||
46 | + (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) || | ||
47 | +#else | ||
48 | (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) || | ||
49 | +#endif | ||
50 | (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) || | ||
51 | (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) || | ||
52 | ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) { | ||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch deleted file mode 100644 index 3b503c49c9..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | From 24a58d70cbb3997e471366bd5afe54be9007bfb1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Tue, 10 Nov 2020 15:32:14 +0000 | ||
4 | Subject: [PATCH] libavutil: include assembly with full path from source root | ||
5 | |||
6 | Otherwise nasm writes the full host-specific paths into .o | ||
7 | output, which breaks binary reproducibility. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | libavutil/x86/cpuid.asm | 2 +- | ||
13 | libavutil/x86/emms.asm | 2 +- | ||
14 | libavutil/x86/fixed_dsp.asm | 2 +- | ||
15 | libavutil/x86/float_dsp.asm | 2 +- | ||
16 | libavutil/x86/lls.asm | 2 +- | ||
17 | libavutil/x86/pixelutils.asm | 2 +- | ||
18 | 6 files changed, 6 insertions(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/libavutil/x86/cpuid.asm b/libavutil/x86/cpuid.asm | ||
21 | index c3f7866..766f77f 100644 | ||
22 | --- a/libavutil/x86/cpuid.asm | ||
23 | +++ b/libavutil/x86/cpuid.asm | ||
24 | @@ -21,7 +21,7 @@ | ||
25 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
26 | ;****************************************************************************** | ||
27 | |||
28 | -%include "x86util.asm" | ||
29 | +%include "libavutil/x86/x86util.asm" | ||
30 | |||
31 | SECTION .text | ||
32 | |||
33 | diff --git a/libavutil/x86/emms.asm b/libavutil/x86/emms.asm | ||
34 | index 8611762..df84f22 100644 | ||
35 | --- a/libavutil/x86/emms.asm | ||
36 | +++ b/libavutil/x86/emms.asm | ||
37 | @@ -18,7 +18,7 @@ | ||
38 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
39 | ;****************************************************************************** | ||
40 | |||
41 | -%include "x86util.asm" | ||
42 | +%include "libavutil/x86/x86util.asm" | ||
43 | |||
44 | SECTION .text | ||
45 | |||
46 | diff --git a/libavutil/x86/fixed_dsp.asm b/libavutil/x86/fixed_dsp.asm | ||
47 | index 979dd5c..2f41185 100644 | ||
48 | --- a/libavutil/x86/fixed_dsp.asm | ||
49 | +++ b/libavutil/x86/fixed_dsp.asm | ||
50 | @@ -20,7 +20,7 @@ | ||
51 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
52 | ;****************************************************************************** | ||
53 | |||
54 | -%include "x86util.asm" | ||
55 | +%include "libavutil/x86/x86util.asm" | ||
56 | |||
57 | SECTION .text | ||
58 | |||
59 | diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm | ||
60 | index 517fd63..b773e61 100644 | ||
61 | --- a/libavutil/x86/float_dsp.asm | ||
62 | +++ b/libavutil/x86/float_dsp.asm | ||
63 | @@ -20,7 +20,7 @@ | ||
64 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
65 | ;****************************************************************************** | ||
66 | |||
67 | -%include "x86util.asm" | ||
68 | +%include "libavutil/x86/x86util.asm" | ||
69 | |||
70 | SECTION_RODATA 32 | ||
71 | pd_reverse: dd 7, 6, 5, 4, 3, 2, 1, 0 | ||
72 | diff --git a/libavutil/x86/lls.asm b/libavutil/x86/lls.asm | ||
73 | index 317fba6..d2526d1 100644 | ||
74 | --- a/libavutil/x86/lls.asm | ||
75 | +++ b/libavutil/x86/lls.asm | ||
76 | @@ -20,7 +20,7 @@ | ||
77 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
78 | ;****************************************************************************** | ||
79 | |||
80 | -%include "x86util.asm" | ||
81 | +%include "libavutil/x86/x86util.asm" | ||
82 | |||
83 | SECTION .text | ||
84 | |||
85 | diff --git a/libavutil/x86/pixelutils.asm b/libavutil/x86/pixelutils.asm | ||
86 | index 36c57c5..8b45ead 100644 | ||
87 | --- a/libavutil/x86/pixelutils.asm | ||
88 | +++ b/libavutil/x86/pixelutils.asm | ||
89 | @@ -21,7 +21,7 @@ | ||
90 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
91 | ;****************************************************************************** | ||
92 | |||
93 | -%include "x86util.asm" | ||
94 | +%include "libavutil/x86/x86util.asm" | ||
95 | |||
96 | SECTION .text | ||
97 | |||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-35964.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-35964.patch deleted file mode 100644 index 6b96bd674f..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-35964.patch +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | From 27a99e2c7d450fef15594671eef4465c8a166bd7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Niedermayer <michael@niedermayer.cc> | ||
3 | Date: Wed, 28 Oct 2020 20:11:54 +0100 | ||
4 | Subject: [PATCH] avformat/vividas: improve extradata packing checks in | ||
5 | track_header() | ||
6 | |||
7 | Fixes: out of array accesses | ||
8 | Fixes: 26622/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6581200338288640 | ||
9 | |||
10 | Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg | ||
11 | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/27a99e2c7d450fef15594671eef4465c8a166bd7] | ||
14 | |||
15 | CVE: CVE-2020-35964 | ||
16 | |||
17 | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | ||
18 | Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> | ||
19 | --- | ||
20 | libavformat/vividas.c | 12 ++++++------ | ||
21 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
22 | |||
23 | diff --git a/libavformat/vividas.c b/libavformat/vividas.c | ||
24 | index 83d0ed116787..46c66bf9a0ae 100644 | ||
25 | --- a/libavformat/vividas.c | ||
26 | +++ b/libavformat/vividas.c | ||
27 | @@ -28,6 +28,7 @@ | ||
28 | * @sa http://wiki.multimedia.cx/index.php?title=Vividas_VIV | ||
29 | */ | ||
30 | |||
31 | +#include "libavutil/avassert.h" | ||
32 | #include "libavutil/intreadwrite.h" | ||
33 | #include "avio_internal.h" | ||
34 | #include "avformat.h" | ||
35 | @@ -379,7 +380,7 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * | ||
36 | |||
37 | if (avio_tell(pb) < off) { | ||
38 | int num_data; | ||
39 | - int xd_size = 0; | ||
40 | + int xd_size = 1; | ||
41 | int data_len[256]; | ||
42 | int offset = 1; | ||
43 | uint8_t *p; | ||
44 | @@ -393,10 +394,10 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * | ||
45 | return AVERROR_INVALIDDATA; | ||
46 | } | ||
47 | data_len[j] = len; | ||
48 | - xd_size += len; | ||
49 | + xd_size += len + 1 + len/255; | ||
50 | } | ||
51 | |||
52 | - ret = ff_alloc_extradata(st->codecpar, 64 + xd_size + xd_size / 255); | ||
53 | + ret = ff_alloc_extradata(st->codecpar, xd_size); | ||
54 | if (ret < 0) | ||
55 | return ret; | ||
56 | |||
57 | @@ -405,9 +406,7 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * | ||
58 | |||
59 | for (j = 0; j < num_data - 1; j++) { | ||
60 | unsigned delta = av_xiphlacing(&p[offset], data_len[j]); | ||
61 | - if (delta > data_len[j]) { | ||
62 | - return AVERROR_INVALIDDATA; | ||
63 | - } | ||
64 | + av_assert0(delta <= xd_size - offset); | ||
65 | offset += delta; | ||
66 | } | ||
67 | |||
68 | @@ -418,6 +417,7 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * | ||
69 | av_freep(&st->codecpar->extradata); | ||
70 | break; | ||
71 | } | ||
72 | + av_assert0(data_len[j] <= xd_size - offset); | ||
73 | offset += data_len[j]; | ||
74 | } | ||
75 | |||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-35965.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-35965.patch deleted file mode 100644 index ddab8e9aca..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-35965.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 3e5959b3457f7f1856d997261e6ac672bba49e8b Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Niedermayer <michael@niedermayer.cc> | ||
3 | Date: Sat, 24 Oct 2020 22:21:48 +0200 | ||
4 | Subject: [PATCH] avcodec/exr: Check ymin vs. h | ||
5 | |||
6 | Fixes: out of array access | ||
7 | Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 | ||
8 | Fixes: 27443/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5631239813595136 | ||
9 | |||
10 | Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg | ||
11 | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/3e5959b3457f7f1856d997261e6ac672bba49e8b] | ||
14 | |||
15 | CVE: CVE-2020-35965 | ||
16 | |||
17 | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | ||
18 | Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> | ||
19 | --- | ||
20 | libavcodec/exr.c | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/libavcodec/exr.c b/libavcodec/exr.c | ||
24 | index e907c5c46401..8b701d1cd298 100644 | ||
25 | --- a/libavcodec/exr.c | ||
26 | +++ b/libavcodec/exr.c | ||
27 | @@ -1830,7 +1830,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, | ||
28 | // Zero out the start if ymin is not 0 | ||
29 | for (i = 0; i < planes; i++) { | ||
30 | ptr = picture->data[i]; | ||
31 | - for (y = 0; y < s->ymin; y++) { | ||
32 | + for (y = 0; y < FFMIN(s->ymin, s->h); y++) { | ||
33 | memset(ptr, 0, out_line_size); | ||
34 | ptr += picture->linesize[i]; | ||
35 | } | ||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch deleted file mode 100644 index 69429af8f0..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | It will add -mips64r6 and -mips64r2 to cmdline which will | ||
2 | cause conflicts | ||
3 | |||
4 | in OE we user mips32r2 and mips64r2 for mips arch versions | ||
5 | so there is no benefit of detecting it automatically by | ||
6 | poking at tools especially in cross env | ||
7 | |||
8 | Fixes errors like | ||
9 | |||
10 | linking -mnan=2008 module with previous -mnan=legacy modules | ||
11 | failed to merge target specific data of file | ||
12 | |||
13 | -Khem | ||
14 | Upstream-Status: Inappropriate [OE-Specific] | ||
15 | |||
16 | Index: ffmpeg-3.1.1/configure | ||
17 | =================================================================== | ||
18 | --- ffmpeg-3.1.1.orig/configure | ||
19 | +++ ffmpeg-3.1.1/configure | ||
20 | @@ -5220,12 +5220,9 @@ elif enabled mips; then | ||
21 | |||
22 | # Enable minimum ISA based on selected options | ||
23 | if enabled mips64; then | ||
24 | - enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6' | ||
25 | enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2' | ||
26 | disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64' | ||
27 | else | ||
28 | - enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6' | ||
29 | - enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5' | ||
30 | enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2' | ||
31 | disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32' | ||
32 | fi | ||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb index bd21552332..aa59755034 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.1.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb | |||
@@ -5,17 +5,16 @@ DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encod | |||
5 | HOMEPAGE = "https://www.ffmpeg.org/" | 5 | HOMEPAGE = "https://www.ffmpeg.org/" |
6 | SECTION = "libs" | 6 | SECTION = "libs" |
7 | 7 | ||
8 | LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT" | 8 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" |
9 | LICENSE_${PN} = "GPLv2+" | 9 | LICENSE:${PN} = "GPL-2.0-or-later" |
10 | LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | 10 | LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" |
11 | LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | 11 | LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" |
12 | LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | 12 | LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" |
13 | LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | 13 | LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" |
14 | LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | 14 | LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" |
15 | LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | 15 | LICENSE:libpostproc = "GPL-2.0-or-later" |
16 | LICENSE_libpostproc = "GPLv2+" | 16 | LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" |
17 | LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | 17 | LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" |
18 | LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
19 | LICENSE_FLAGS = "commercial" | 18 | LICENSE_FLAGS = "commercial" |
20 | 19 | ||
21 | LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 20 | LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
@@ -23,19 +22,21 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
23 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ | 22 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ |
24 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" | 23 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" |
25 | 24 | ||
26 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ | 25 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz" |
27 | file://mips64_cpu_detection.patch \ | 26 | |
28 | file://0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch \ | 27 | SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968" |
29 | file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ | 28 | |
30 | file://CVE-2020-35964.patch \ | 29 | # https://nvd.nist.gov/vuln/detail/CVE-2023-39018 |
31 | file://CVE-2020-35965.patch \ | 30 | # https://github.com/bramp/ffmpeg-cli-wrapper/issues/291 |
32 | " | 31 | # https://security-tracker.debian.org/tracker/CVE-2023-39018 |
33 | SRC_URI[sha256sum] = "ad009240d46e307b4e03a213a0f49c11b650e445b1f8be0dda2a9212b34d2ffb" | 32 | # https://bugzilla.suse.com/show_bug.cgi?id=CVE-2023-39018 |
33 | CVE_STATUS[CVE-2023-39018] = "cpe-incorrect: This issue belongs to ffmpeg-cli-wrapper \ | ||
34 | (Java wrapper around the FFmpeg CLI) and not ffmepg itself." | ||
34 | 35 | ||
35 | # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 | 36 | # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 |
36 | ARM_INSTRUCTION_SET_armv4 = "arm" | 37 | ARM_INSTRUCTION_SET:armv4 = "arm" |
37 | ARM_INSTRUCTION_SET_armv5 = "arm" | 38 | ARM_INSTRUCTION_SET:armv5 = "arm" |
38 | ARM_INSTRUCTION_SET_armv6 = "arm" | 39 | ARM_INSTRUCTION_SET:armv6 = "arm" |
39 | 40 | ||
40 | # Should be API compatible with libav (which was a fork of ffmpeg) | 41 | # Should be API compatible with libav (which was a fork of ffmpeg) |
41 | # libpostproc was previously packaged from a separate recipe | 42 | # libpostproc was previously packaged from a separate recipe |
@@ -45,9 +46,8 @@ DEPENDS = "nasm-native" | |||
45 | 46 | ||
46 | inherit autotools pkgconfig | 47 | inherit autotools pkgconfig |
47 | 48 | ||
48 | PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \ | 49 | PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \ |
49 | alsa bzlib gpl lzma pic pthreads shared theora x264 zlib \ | 50 | alsa bzlib lzma theora zlib \ |
50 | ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ | ||
51 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" | 51 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" |
52 | 52 | ||
53 | # libraries to build in addition to avutil | 53 | # libraries to build in addition to avutil |
@@ -58,7 +58,6 @@ PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" | |||
58 | PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" | 58 | PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" |
59 | PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" | 59 | PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" |
60 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" | 60 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" |
61 | PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" | ||
62 | 61 | ||
63 | # features to support | 62 | # features to support |
64 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" | 63 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" |
@@ -68,6 +67,7 @@ PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk- | |||
68 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | 67 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" |
69 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | 68 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" |
70 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | 69 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" |
70 | PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus" | ||
71 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" | 71 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" |
72 | PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" | 72 | PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" |
73 | PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" | 73 | PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" |
@@ -77,6 +77,7 @@ PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" | |||
77 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" | 77 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" |
78 | PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt" | 78 | PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt" |
79 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" | 79 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" |
80 | PACKAGECONFIG[v4l2] = "--enable-libv4l2,--disable-libv4l2,v4l-utils" | ||
80 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | 81 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" |
81 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" | 82 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" |
82 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | 83 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" |
@@ -86,13 +87,6 @@ PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" | |||
86 | PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" | 87 | PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" |
87 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | 88 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" |
88 | 89 | ||
89 | # other configuration options | ||
90 | PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2" | ||
91 | PACKAGECONFIG[pic] = "--enable-pic" | ||
92 | PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads" | ||
93 | PACKAGECONFIG[shared] = "--enable-shared" | ||
94 | PACKAGECONFIG[strip] = ",--disable-stripping" | ||
95 | |||
96 | # Check codecs that require --enable-nonfree | 90 | # Check codecs that require --enable-nonfree |
97 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" | 91 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" |
98 | 92 | ||
@@ -103,41 +97,63 @@ def cpu(d): | |||
103 | return 'generic' | 97 | return 'generic' |
104 | 98 | ||
105 | EXTRA_OECONF = " \ | 99 | EXTRA_OECONF = " \ |
100 | --disable-stripping \ | ||
101 | --enable-pic \ | ||
102 | --enable-shared \ | ||
103 | --enable-pthreads \ | ||
106 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ | 104 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ |
107 | \ | 105 | \ |
108 | --cross-prefix=${TARGET_PREFIX} \ | 106 | --cross-prefix=${TARGET_PREFIX} \ |
109 | \ | 107 | \ |
110 | --ld="${CCLD}" \ | 108 | --ld='${CCLD}' \ |
111 | --cc="${CC}" \ | 109 | --cc='${CC}' \ |
112 | --cxx="${CXX}" \ | 110 | --cxx='${CXX}' \ |
113 | --arch=${TARGET_ARCH} \ | 111 | --arch=${TARGET_ARCH} \ |
114 | --target-os="linux" \ | 112 | --target-os='linux' \ |
115 | --enable-cross-compile \ | 113 | --enable-cross-compile \ |
116 | --extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ | 114 | --extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \ |
117 | --extra-ldflags="${LDFLAGS}" \ | 115 | --extra-ldflags='${LDFLAGS}' \ |
118 | --sysroot="${STAGING_DIR_TARGET}" \ | 116 | --sysroot='${STAGING_DIR_TARGET}' \ |
119 | ${EXTRA_FFCONF} \ | 117 | ${EXTRA_FFCONF} \ |
120 | --libdir=${libdir} \ | 118 | --libdir=${libdir} \ |
121 | --shlibdir=${libdir} \ | 119 | --shlibdir=${libdir} \ |
122 | --datadir=${datadir}/ffmpeg \ | 120 | --datadir=${datadir}/ffmpeg \ |
121 | ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \ | ||
123 | --cpu=${@cpu(d)} \ | 122 | --cpu=${@cpu(d)} \ |
124 | --pkg-config=pkg-config \ | 123 | --pkg-config=pkg-config \ |
125 | " | 124 | " |
126 | 125 | ||
127 | EXTRA_OECONF_append_linux-gnux32 = " --disable-asm" | 126 | EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" |
127 | |||
128 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" | ||
129 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" | ||
130 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" | ||
131 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" | ||
132 | EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \ | ||
133 | --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa" | ||
134 | EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic --disable-rvv --disable-asm" | ||
135 | EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic" | ||
136 | EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic" | ||
137 | EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" | ||
138 | EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" | ||
139 | |||
128 | # gold crashes on x86, another solution is to --disable-asm but thats more hacky | 140 | # gold crashes on x86, another solution is to --disable-asm but thats more hacky |
129 | # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 | 141 | # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 |
130 | 142 | ||
131 | LDFLAGS_append_x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" | 143 | LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" |
144 | LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}" | ||
132 | 145 | ||
133 | EXTRA_OEMAKE = "V=1" | 146 | EXTRA_OEMAKE = "V=1" |
134 | 147 | ||
135 | do_configure() { | 148 | do_configure() { |
149 | export TMPDIR="${B}/tmp" | ||
150 | mkdir -p ${B}/tmp | ||
136 | ${S}/configure ${EXTRA_OECONF} | 151 | ${S}/configure ${EXTRA_OECONF} |
152 | sed -i -e "s,^X86ASMFLAGS=.*,& --debug-prefix-map=${S}=${TARGET_DBGSRC_DIR} --debug-prefix-map=${B}=${TARGET_DBGSRC_DIR},g" ${B}/ffbuild/config.mak | ||
137 | } | 153 | } |
138 | 154 | ||
139 | # patch out build host paths for reproducibility | 155 | # patch out build host paths for reproducibility |
140 | do_compile_prepend_class-target() { | 156 | do_compile:prepend:class-target() { |
141 | sed -i -e "s,${WORKDIR},,g" ${B}/config.h | 157 | sed -i -e "s,${WORKDIR},,g" ${B}/config.h |
142 | } | 158 | } |
143 | 159 | ||
@@ -145,29 +161,26 @@ PACKAGES =+ "libavcodec \ | |||
145 | libavdevice \ | 161 | libavdevice \ |
146 | libavfilter \ | 162 | libavfilter \ |
147 | libavformat \ | 163 | libavformat \ |
148 | libavresample \ | ||
149 | libavutil \ | 164 | libavutil \ |
150 | libpostproc \ | 165 | libpostproc \ |
151 | libswresample \ | 166 | libswresample \ |
152 | libswscale" | 167 | libswscale" |
153 | 168 | ||
154 | FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}" | 169 | FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" |
155 | FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}" | 170 | FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" |
156 | FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}" | 171 | FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}" |
157 | FILES_libavformat = "${libdir}/libavformat${SOLIBS}" | 172 | FILES:libavformat = "${libdir}/libavformat${SOLIBS}" |
158 | FILES_libavresample = "${libdir}/libavresample${SOLIBS}" | 173 | FILES:libavutil = "${libdir}/libavutil${SOLIBS}" |
159 | FILES_libavutil = "${libdir}/libavutil${SOLIBS}" | 174 | FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" |
160 | FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}" | 175 | FILES:libswresample = "${libdir}/libswresample${SOLIBS}" |
161 | FILES_libswresample = "${libdir}/libswresample${SOLIBS}" | 176 | FILES:libswscale = "${libdir}/libswscale${SOLIBS}" |
162 | FILES_libswscale = "${libdir}/libswscale${SOLIBS}" | ||
163 | 177 | ||
164 | # ffmpeg disables PIC on some platforms (e.g. x86-32) | 178 | # ffmpeg disables PIC on some platforms (e.g. x86-32) |
165 | INSANE_SKIP_${MLPREFIX}libavcodec = "textrel" | 179 | INSANE_SKIP:${MLPREFIX}libavcodec = "textrel" |
166 | INSANE_SKIP_${MLPREFIX}libavdevice = "textrel" | 180 | INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" |
167 | INSANE_SKIP_${MLPREFIX}libavfilter = "textrel" | 181 | INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" |
168 | INSANE_SKIP_${MLPREFIX}libavformat = "textrel" | 182 | INSANE_SKIP:${MLPREFIX}libavformat = "textrel" |
169 | INSANE_SKIP_${MLPREFIX}libavutil = "textrel" | 183 | INSANE_SKIP:${MLPREFIX}libavutil = "textrel" |
170 | INSANE_SKIP_${MLPREFIX}libavresample = "textrel" | 184 | INSANE_SKIP:${MLPREFIX}libswscale = "textrel" |
171 | INSANE_SKIP_${MLPREFIX}libswscale = "textrel" | 185 | INSANE_SKIP:${MLPREFIX}libswresample = "textrel" |
172 | INSANE_SKIP_${MLPREFIX}libswresample = "textrel" | 186 | INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" |
173 | INSANE_SKIP_${MLPREFIX}libpostproc = "textrel" | ||