X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-codec-support%2Fsrc%2Fdata%2Fmod.rs;h=eba029939a3a46643dea1fd3a650a7eccf1f3927;hp=2ad6b8c9e1fb1fad2e2c1848347acb217ddccd72;hb=379524159c95f1c3639976ccf35f9d47cd9732ac;hpb=fa49f0616b3b7f6454ea5722f8a6d1ca38908df6 diff --git a/nihav-codec-support/src/data/mod.rs b/nihav-codec-support/src/data/mod.rs index 2ad6b8c..eba0299 100644 --- a/nihav-codec-support/src/data/mod.rs +++ b/nihav-codec-support/src/data/mod.rs @@ -54,7 +54,7 @@ impl GenericCache { pub fn full_size(&self) -> usize { self.stride * (self.height + 1) + 1 } /// Resets the cache state. pub fn reset(&mut self) { - self.data.truncate(0); + self.data.clear(); let size = self.full_size(); self.data.resize(size, self.default); self.xpos = self.stride + 1;