aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-indeo/src/codecs/ivibr.rs
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2021-10-29 14:40:07 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2021-10-29 14:40:07 +0200
commit379524159c95f1c3639976ccf35f9d47cd9732ac (patch)
treea420329fa8bbb301f2d290d4813621b1c64afd12 /nihav-indeo/src/codecs/ivibr.rs
parentfa49f0616b3b7f6454ea5722f8a6d1ca38908df6 (diff)
downloadnihav-379524159c95f1c3639976ccf35f9d47cd9732ac.tar.gz
replace vec.truncate(0) with vec.clear()
Diffstat (limited to 'nihav-indeo/src/codecs/ivibr.rs')
-rw-r--r--nihav-indeo/src/codecs/ivibr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/nihav-indeo/src/codecs/ivibr.rs b/nihav-indeo/src/codecs/ivibr.rs
index 141200c..8ce4d1b 100644
--- a/nihav-indeo/src/codecs/ivibr.rs
+++ b/nihav-indeo/src/codecs/ivibr.rs
@@ -510,8 +510,8 @@ impl IVIDecoder {
fn realloc(&mut self, pic_hdr: &PictureHeader) -> DecoderResult<()> {
let planes = if pic_hdr.transparent { 4 } else { 3 };
- //self.bands.truncate(0);
- self.tiles.truncate(0);
+ //self.bands.clear();
+ self.tiles.clear();
self.num_tiles = [[0; 4]; 4];
self.tile_start = [[0; 4]; 4];
let mut tstart: usize = 0;
@@ -582,7 +582,7 @@ impl IVIDecoder {
let mb_h = (tile.h + mb_size - 1) / mb_size;
tile.mb_w = mb_w;
tile.mb_h = mb_h;
- tile.mb.truncate(0);
+ tile.mb.clear();
tile.mb.resize(mb_w * mb_h, MB::new(0, 0));
}