diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-02-14 18:50:51 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-02-14 18:50:51 +0100 |
commit | f638a5b1b3241b3433689983aca22d9e6518a64f (patch) | |
tree | ca109081b0d7af1242753174bf2ca2717dbc2ec1 /nihav-commonfmt | |
parent | 2bf1f2332263f37d3cffa4bdee50f58d29bec680 (diff) | |
download | nihav-f638a5b1b3241b3433689983aca22d9e6518a64f.tar.gz |
avi: fix handling of palette change chunk with 256 colours
Diffstat (limited to 'nihav-commonfmt')
-rw-r--r-- | nihav-commonfmt/src/demuxers/avi.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index 0ab7711..f14c31a 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -429,6 +429,7 @@ impl<'a> AVIDemuxer<'a> { if pe.stream_no == stream_no { let start_clr = self.src.read_byte()? as usize; let len = self.src.read_byte()? as usize; + let len = if len == 0 { 256 } else { len }; let _flags = self.src.read_u16le()?; validate!(start_clr + len <= 256); validate!(len * 4 + 4 == size); |