From 283edd38eb7568c84fa45650fb01cfb517c3adfd Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Tue, 12 May 2026 15:40:19 +0400 Subject: [PATCH] clippy: fix very_complex_type in wzp-video (HevcParameterSets alias) --- crates/wzp-video/src/mediacodec.rs | 5 ++++- crates/wzp-video/src/videotoolbox.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/wzp-video/src/mediacodec.rs b/crates/wzp-video/src/mediacodec.rs index 303d0cd..e3f6aa9 100644 --- a/crates/wzp-video/src/mediacodec.rs +++ b/crates/wzp-video/src/mediacodec.rs @@ -669,9 +669,12 @@ impl VideoDecoder for MediaCodecHevcDecoder { } } +/// Type alias for HEVC parameter-set triple returned by `extract_vps_sps_pps`. +type HevcParameterSets = (Option>, Option>, Option>); + /// Parse an Annex-B access unit and return the first VPS, SPS and PPS found (HEVC). #[allow(dead_code)] -fn extract_vps_sps_pps(annex_b: &[u8]) -> (Option>, Option>, Option>) { +fn extract_vps_sps_pps(annex_b: &[u8]) -> HevcParameterSets { let nals = split_annex_b(annex_b); let mut vps = None; let mut sps = None; diff --git a/crates/wzp-video/src/videotoolbox.rs b/crates/wzp-video/src/videotoolbox.rs index 450a626..93b7bde 100644 --- a/crates/wzp-video/src/videotoolbox.rs +++ b/crates/wzp-video/src/videotoolbox.rs @@ -652,8 +652,11 @@ impl VideoDecoder for VideoToolboxHevcDecoder { } } +/// Type alias for HEVC parameter-set triple returned by `extract_vps_sps_pps`. +type HevcParameterSets = (Option>, Option>, Option>); + /// Parse an Annex-B access unit and return the first VPS, SPS and PPS found (HEVC). -fn extract_vps_sps_pps(annex_b: &[u8]) -> (Option>, Option>, Option>) { +fn extract_vps_sps_pps(annex_b: &[u8]) -> HevcParameterSets { let nals = split_annex_b(annex_b); let mut vps = None; let mut sps = None;