From cc453c9b96f65775d30325de1e5a09454dd953a3 Mon Sep 17 00:00:00 2001
From: Upgrade Helper <auh@yoctoproject.org>
Date: Tue, 15 Oct 2024 11:43:26 +0000
Subject: [PATCH] ffmpeg: upgrade 7.0.2 -> 7.1

---
 ...figure-improve-check-for-POSIX-ioctl.patch | 36 +++----------
 ...lpdsp_armv5te-fix-label-format-to-wo.patch | 52 -------------------
 .../ffmpeg/{ffmpeg_7.0.2.bb => ffmpeg_7.1.bb} | 10 ++--
 3 files changed, 11 insertions(+), 87 deletions(-)
 delete mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
 rename meta/recipes-multimedia/ffmpeg/{ffmpeg_7.0.2.bb => ffmpeg_7.1.bb} (96%)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-configure-improve-check-for-POSIX-ioctl.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-configure-improve-check-for-POSIX-ioctl.patch
index b7c8cb2135..ed8cd081c1 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-configure-improve-check-for-POSIX-ioctl.patch
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-configure-improve-check-for-POSIX-ioctl.patch
@@ -1,4 +1,4 @@
-From 82b5617b8197246cf5b2af98a28f2aa37b8c8aa1 Mon Sep 17 00:00:00 2001
+From 9d2e8b23b7ffe6c3849c82de7f67028aa8c35ad1 Mon Sep 17 00:00:00 2001
 From: Ramiro Polla <ramiro.polla@gmail.com>
 Date: Thu, 29 Aug 2024 15:40:00 +0200
 Subject: [PATCH] configure: improve check for POSIX ioctl
@@ -9,40 +9,18 @@ detect the POSIX ioctl signature at configure time.
 Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/00b64fca55a3a009c9d0e391c85f4fd3291e5d12]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- configure          | 2 ++
- libavdevice/v4l2.c | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
+ configure | 1 +
+ 1 file changed, 1 insertion(+)
 
 diff --git a/configure b/configure
-index 8642513..d70b0bb 100755
+index d77a55b..46d8e09 100755
 --- a/configure
 +++ b/configure
-@@ -2517,6 +2517,7 @@ HAVE_LIST="
-     opencl_videotoolbox
-     perl
-     pod2man
-+    posix_ioctl
-     texi2html
-     xmllint
-     zlib_gzip
-@@ -7131,6 +7132,7 @@ perl -v            > /dev/null 2>&1 && enable perl      || disable perl
+@@ -7177,6 +7177,7 @@ perl -v            > /dev/null 2>&1 && enable perl      || disable perl
  pod2man --help     > /dev/null 2>&1 && enable pod2man   || disable pod2man
  rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
  xmllint --version  > /dev/null 2>&1 && enable xmllint   || disable xmllint
 +test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl
  
- # check V4L2 codecs available in the API
- if enabled v4l2_m2m; then
-diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
-index 50ac47e..ee01711 100644
---- a/libavdevice/v4l2.c
-+++ b/libavdevice/v4l2.c
-@@ -107,7 +107,7 @@ struct video_data {
-     int (*open_f)(const char *file, int oflag, ...);
-     int (*close_f)(int fd);
-     int (*dup_f)(int fd);
--#if defined(__sun) || defined(__BIONIC__) || defined(__musl__) /* POSIX-like */
-+#if HAVE_POSIX_IOCTL
-     int (*ioctl_f)(int fd, int request, ...);
- #else
-     int (*ioctl_f)(int fd, unsigned long int request, ...);
+ check_headers linux/fb.h
+ check_headers linux/videodev2.h
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
deleted file mode 100644
index b7cd048165..0000000000
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From e52fc2c11c3935085ccf1a5707ce50223ad62b58 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@arm.com>
-Date: Thu, 8 Aug 2024 18:04:17 +0100
-Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work with
- binutils 2.43
-
-binutils 2.43 has stricter validation for labels[1] and results in errors
-when building ffmpeg for armv5:
-
-src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line, first unrecognized character is `0'
-
-Remove the leading zero in the "01" label to resolve this error.
-
-[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
-
-Upstream-Status: Submitted [https://ffmpeg.org//pipermail/ffmpeg-devel/2024-August/332149.html]
-Signed-off-by: Ross Burton <ross.burton@arm.com>
----
- libavcodec/arm/mlpdsp_armv5te.S | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/arm/mlpdsp_armv5te.S b/libavcodec/arm/mlpdsp_armv5te.S
-index 4f9aa48..d315686 100644
---- a/libavcodec/arm/mlpdsp_armv5te.S
-+++ b/libavcodec/arm/mlpdsp_armv5te.S
-@@ -229,7 +229,7 @@ A .endif
-   .endif
- 
-         // Begin loop
--01:
-+1:
-   .if TOTAL_TAPS == 0
-         // Things simplify a lot in this case
-         // In fact this could be pipelined further if it's worth it...
-@@ -241,7 +241,7 @@ A .endif
-         str     ST0, [PST, #-4]!
-         str     ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
-         str     ST0, [PSAMP], #4 * MAX_CHANNELS
--        bne     01b
-+        bne     1b
-   .else
-     .if \fir_taps & 1
-       .set LOAD_REG, 1
-@@ -333,7 +333,7 @@ T       orr     AC0, AC0, AC1
-         str     ST3, [PST, #-4]!
-         str     ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
-         str     ST3, [PSAMP], #4 * MAX_CHANNELS
--        bne     01b
-+        bne     1b
-   .endif
-         b       99f
- 
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
similarity index 96%
rename from meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
rename to meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
index af66104ebf..a7eebe361a 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
@@ -22,13 +22,11 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
                     file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
 
-SRC_URI = " \
-    https://www.ffmpeg.org/releases/${BP}.tar.xz \
-    file://0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch \
-    file://0001-configure-improve-check-for-POSIX-ioctl.patch \
-"
+SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
+           file://0001-configure-improve-check-for-POSIX-ioctl.patch \
+           "
 
-SRC_URI[sha256sum] = "8646515b638a3ad303e23af6a3587734447cb8fc0a0c064ecdb8e95c4fd8b389"
+SRC_URI[sha256sum] = "40973d44970dbc83ef302b0609f2e74982be2d85916dd2ee7472d30678a7abe6"
 
 # https://nvd.nist.gov/vuln/detail/CVE-2023-39018
 # https://github.com/bramp/ffmpeg-cli-wrapper/issues/291
-- 
2.44.1

