File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,9 @@ pub fn hwdevice_list_available_device_types() -> Vec<HardwareAccelerationDeviceT
4545 ffmpeg:: ffi:: av_hwdevice_iterate_types ( ffmpeg:: ffi:: AVHWDeviceType :: AV_HWDEVICE_TYPE_NONE )
4646 } ;
4747 while hwdevice_type != ffmpeg:: ffi:: AVHWDeviceType :: AV_HWDEVICE_TYPE_NONE {
48- hwdevice_types. push ( HardwareAccelerationDeviceType :: from ( hwdevice_type) . unwrap ( ) ) ;
48+ if let Some ( device_type) = HardwareAccelerationDeviceType :: from ( hwdevice_type) {
49+ hwdevice_types. push ( device_type) ;
50+ }
4951 hwdevice_type = unsafe { ffmpeg:: ffi:: av_hwdevice_iterate_types ( hwdevice_type) } ;
5052 }
5153 hwdevice_types
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ impl HardwareAccelerationDeviceType {
9393 // FIXME: Find a way to handle the new variants in ffmpeg 7 without breaking backwards
9494 // compatibility...
9595 #[ allow( unreachable_patterns) ]
96- _ => unimplemented ! ( ) ,
96+ _ => None
9797 }
9898 }
9999}
You can’t perform that action at this time.
0 commit comments