diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2021-10-29 14:40:07 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2021-10-29 14:40:07 +0200 |
commit | 379524159c95f1c3639976ccf35f9d47cd9732ac (patch) | |
tree | a420329fa8bbb301f2d290d4813621b1c64afd12 /nihav-codec-support/src/codecs/h263/decoder.rs | |
parent | fa49f0616b3b7f6454ea5722f8a6d1ca38908df6 (diff) | |
download | nihav-379524159c95f1c3639976ccf35f9d47cd9732ac.tar.gz |
replace vec.truncate(0) with vec.clear()
Diffstat (limited to 'nihav-codec-support/src/codecs/h263/decoder.rs')
-rw-r--r-- | nihav-codec-support/src/codecs/h263/decoder.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nihav-codec-support/src/codecs/h263/decoder.rs b/nihav-codec-support/src/codecs/h263/decoder.rs index e1af173..bba8c04 100644 --- a/nihav-codec-support/src/codecs/h263/decoder.rs +++ b/nihav-codec-support/src/codecs/h263/decoder.rs @@ -538,16 +538,16 @@ impl H263BaseDecoder { if capacity < self.num_mb { self.obmc_blk.reserve(self.num_mb - capacity); } - self.obmc_blk.truncate(0); + self.obmc_blk.clear(); } if self.has_b { - self.mv_data.truncate(0); + self.mv_data.clear(); } let save_b_data = pinfo.mode.is_ref() && self.may_have_b_frames; if save_b_data { - self.mv_data.truncate(0); + self.mv_data.clear(); } let is_b = pinfo.mode == Type::B; @@ -580,7 +580,7 @@ impl H263BaseDecoder { let mut mb_pos = 0; let apply_acpred = /*(pinfo.mode == Type::I) && */pinfo.plusinfo.is_some() && pinfo.plusinfo.unwrap().aic; if apply_acpred { - self.pred_coeffs.truncate(0); + self.pred_coeffs.clear(); if !self.pred_quant { self.pred_coeffs.resize(self.mb_w * self.mb_h, ZERO_PRED_COEFFS); } else { @@ -796,7 +796,7 @@ impl H263BaseDecoder { recon_b_frame(b_buf, bck_buf.clone(), fwd_buf.clone(), self.mb_w, self.mb_h, self.b_data.as_slice(), bdsp); } - self.b_data.truncate(0); + self.b_data.clear(); Ok(bufinfo) } } |