]> git.nihav.org Git - nihav.git/commitdiff
avi: ignore pads streams
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 16 Oct 2024 16:33:59 +0000 (18:33 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 16 Oct 2024 16:33:59 +0000 (18:33 +0200)
nihav-commonfmt/src/demuxers/avi.rs

index ebcf21935d50468995082f71584c0cbed55bfc09..0db514d28c8c1bc3ca3ba7bfe34fcf5cab91ba61 100644 (file)
@@ -565,6 +565,11 @@ fn parse_strh(dmx: &mut AVIDemuxer, strmgr: &mut StreamManager, size: usize) ->
 
     dmx.src.read_skip(size - 0x38)?;
 
+    // padding streams should be ignored
+    if tag == mktag!(b"pads") {
+        return Ok(size);
+    }
+
     if !dmx.sstate.valid_state() || dmx.sstate.strm_no >= dmx.num_streams {
         return Err(InvalidData);
     }