git: e337ba9d6725 - main - multimedia/av1an: merge ffmpeg fix from f6e17b1726ba into one file

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sun, 20 Feb 2022 13:37:03 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e337ba9d6725bb7950c83e26453c7a499218e440

commit e337ba9d6725bb7950c83e26453c7a499218e440
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-02-20 13:24:00 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-02-20 13:36:10 +0000

    multimedia/av1an: merge ffmpeg fix from f6e17b1726ba into one file
    
    In my Rust-based ports patches are usually split "by topic" (large
    changes) or "by crate" (many small changes). The important details
    are "whether/when it landed upstream?" and "what error is being fixed?"
---
 ...ates_ffmpeg-sys-next-4.4.0_src_avutil_pixfmt.rs | 10 ----------
 multimedia/av1an/files/patch-ffmpeg                | 23 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/multimedia/av1an/files/patch-cargo-crates_ffmpeg-sys-next-4.4.0_src_avutil_pixfmt.rs b/multimedia/av1an/files/patch-cargo-crates_ffmpeg-sys-next-4.4.0_src_avutil_pixfmt.rs
deleted file mode 100644
index b567c08cd69f..000000000000
--- a/multimedia/av1an/files/patch-cargo-crates_ffmpeg-sys-next-4.4.0_src_avutil_pixfmt.rs
+++ /dev/null
@@ -1,10 +0,0 @@
---- cargo-crates/ffmpeg-sys-next-4.4.0/src/avutil/pixfmt.rs.orig	2022-01-03 20:02:01 UTC
-+++ cargo-crates/ffmpeg-sys-next-4.4.0/src/avutil/pixfmt.rs
-@@ -35,6 +35,7 @@ pub const AV_PIX_FMT_BGR555: AVPixelFormat = AV_PIX_FM
- #[cfg(target_endian = "little")]
- pub const AV_PIX_FMT_BGR444: AVPixelFormat = AV_PIX_FMT_BGR444LE;
- 
-+#[cfg(target_endian = "little")]
- pub const AV_PIX_FMT_YUV420P9: AVPixelFormat = AV_PIX_FMT_YUV420P9LE;
- #[cfg(target_endian = "little")]
- pub const AV_PIX_FMT_YUV422P9: AVPixelFormat = AV_PIX_FMT_YUV422P9LE;
diff --git a/multimedia/av1an/files/patch-ffmpeg b/multimedia/av1an/files/patch-ffmpeg
index b8ab02548b34..a6972269c04d 100644
--- a/multimedia/av1an/files/patch-ffmpeg
+++ b/multimedia/av1an/files/patch-ffmpeg
@@ -35,6 +35,19 @@ help: change the type of the numeric literal from `i8` to `u8`
 205 |     [[0_u8; AV_ERROR_MAX_STRING_SIZE]; 27];
     |       ~~~~
 
+https://github.com/zmwangx/rust-ffmpeg-sys/commit/b9382c010ab2
+
+error[E0428]: the name `AV_PIX_FMT_YUV420P9` is defined multiple times
+   --> cargo-crates/ffmpeg-sys-next-4.4.0/src/avutil/pixfmt.rs:155:1
+    |
+38  | pub const AV_PIX_FMT_YUV420P9: AVPixelFormat = AV_PIX_FMT_YUV420P9LE;
+    | --------------------------------------------------------------------- previous definition of the value `AV_PIX_FMT_YUV420P9` here
+...
+155 | pub const AV_PIX_FMT_YUV420P9: AVPixelFormat = AV_PIX_FMT_YUV420P9BE;
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `AV_PIX_FMT_YUV420P9` redefined here
+    |
+    = note: `AV_PIX_FMT_YUV420P9` must be defined only once in the value namespace of this module
+
 --- cargo-crates/ffmpeg-next-4.4.0/src/util/error.rs.orig	1970-01-01 00:00:00 UTC
 +++ cargo-crates/ffmpeg-next-4.4.0/src/util/error.rs
 @@ -17,10 +17,10 @@ pub use libc::{
@@ -61,3 +74,13 @@ help: change the type of the numeric literal from `i8` to `u8`
  
  pub fn register_all() {
      unsafe {
+--- cargo-crates/ffmpeg-sys-next-4.4.0/src/avutil/pixfmt.rs.orig	1970-01-01 00:00:00 UTC
++++ cargo-crates/ffmpeg-sys-next-4.4.0/src/avutil/pixfmt.rs
+@@ -35,6 +35,7 @@ pub const AV_PIX_FMT_BGR555: AVPixelFormat = AV_PIX_FM
+ #[cfg(target_endian = "little")]
+ pub const AV_PIX_FMT_BGR444: AVPixelFormat = AV_PIX_FMT_BGR444LE;
+ 
++#[cfg(target_endian = "little")]
+ pub const AV_PIX_FMT_YUV420P9: AVPixelFormat = AV_PIX_FMT_YUV420P9LE;
+ #[cfg(target_endian = "little")]
+ pub const AV_PIX_FMT_YUV422P9: AVPixelFormat = AV_PIX_FMT_YUV422P9LE;