X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-core%2Fsrc%2Fscale%2Fmod.rs;h=f93b9d25afc32e574aa6e69bcaa8e7d7f2515c51;hb=36294f20b37c13c8b4c468a08e803baedac7e938;hp=e66d393c0733917fc8c08beac3b2c98cc8302e73;hpb=4b459d0b9b76cb51c1029e6d1ffb17cf5f2d44d9;p=nihav.git diff --git a/nihav-core/src/scale/mod.rs b/nihav-core/src/scale/mod.rs index e66d393..f93b9d2 100644 --- a/nihav-core/src/scale/mod.rs +++ b/nihav-core/src/scale/mod.rs @@ -21,6 +21,7 @@ mod kernel; mod colorcvt; mod repack; +#[allow(clippy::module_inception)] mod scale; mod palette; @@ -319,7 +320,7 @@ pub fn flip_picture(pic: &mut NABufferType) -> ScaleResult<()> { } }, NABufferType::Video16(ref mut vb) => { - let ncomp = vb.get_num_components(); + let ncomp = vb.get_num_components().max(1); for comp in 0..ncomp { let off = vb.get_offset(comp); let stride = vb.get_stride(comp); @@ -331,7 +332,7 @@ pub fn flip_picture(pic: &mut NABufferType) -> ScaleResult<()> { } }, NABufferType::Video32(ref mut vb) => { - let ncomp = vb.get_num_components(); + let ncomp = vb.get_num_components().max(1); for comp in 0..ncomp { let off = vb.get_offset(comp); let stride = vb.get_stride(comp);