From 73eade8f26b028c6cb8fa77bc2c10836cb78909c Mon Sep 17 00:00:00 2001 From: Gerwin van der Lugt Date: Tue, 16 Apr 2024 13:55:17 +0200 Subject: [PATCH] add code path for unimplemented hwaccel enum variants --- src/hwaccel.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hwaccel.rs b/src/hwaccel.rs index eb76aad..401f5a3 100644 --- a/src/hwaccel.rs +++ b/src/hwaccel.rs @@ -92,8 +92,11 @@ impl HardwareAccelerationDeviceType { ffmpeg::ffi::AVHWDeviceType::AV_HWDEVICE_TYPE_OPENCL => Some(Self::OpenCl), ffmpeg::ffi::AVHWDeviceType::AV_HWDEVICE_TYPE_MEDIACODEC => Some(Self::MeiaCodec), ffmpeg::ffi::AVHWDeviceType::AV_HWDEVICE_TYPE_VULKAN => Some(Self::Vulkan), - // ffmpeg::ffi::AVHWDeviceType::AV_HWDEVICE_TYPE_D3D12VA => Self::D3D12Va, ffmpeg::ffi::AVHWDeviceType::AV_HWDEVICE_TYPE_NONE => None, + // FIXME: Find a way to handle the new variants in ffmpeg 7 without breaking backwards + // compatibility... + #[allow(unreachable_patterns)] + _ => unimplemented!(), } } }