From: Kostya Shishkov Date: Thu, 6 Oct 2022 16:10:10 +0000 (+0200) Subject: indeo4: fix picture header parsing X-Git-Url: https://git.nihav.org/?p=nihav.git;a=commitdiff_plain;h=488bcae4ef7642ffaf891264373396d1db5b887f indeo4: fix picture header parsing --- diff --git a/nihav-indeo/src/codecs/indeo4.rs b/nihav-indeo/src/codecs/indeo4.rs index c20732a..526668b 100644 --- a/nihav-indeo/src/codecs/indeo4.rs +++ b/nihav-indeo/src/codecs/indeo4.rs @@ -76,13 +76,9 @@ impl IndeoXParser for Indeo4Parser { let slice_h; if br.read_bool()? { let idx = br.read(4)? as usize; - if idx < 15 { - slice_w = INDEO4_SLICE_SIZE_TAB[idx]; - slice_h = INDEO4_SLICE_SIZE_TAB[idx]; - } else { - slice_w = width; - slice_h = height; - } + slice_h = if idx < 15 { INDEO4_SLICE_SIZE_TAB[idx] } else { height }; + let idx = br.read(4)? as usize; + slice_w = if idx < 15 { INDEO4_SLICE_SIZE_TAB[idx] } else { width }; } else { slice_w = width; slice_h = height;