avi: do not ignore guessed format
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 23 May 2020 16:44:54 +0000 (18:44 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 23 May 2020 16:44:54 +0000 (18:44 +0200)
nihav-commonfmt/src/demuxers/avi.rs

index a966460029840306382c3bc13065c51261ef70c1..ed4edd4d67b7836c1335ac3970958e68d1db7764 100644 (file)
@@ -409,7 +409,7 @@ fn parse_strf_vids(dmx: &mut AVIDemuxer, strmgr: &mut StreamManager, size: usize
 
     let flip = height < 0;
     let format = if bitcount > 8 { RGB24_FORMAT } else { PAL8_FORMAT };
-    let vhdr = NAVideoInfo::new(width as usize, if flip { -height as usize } else { height as usize}, flip, PAL8_FORMAT);
+    let vhdr = NAVideoInfo::new(width as usize, if flip { -height as usize } else { height as usize}, flip, format);
     let vci = NACodecTypeInfo::Video(vhdr);
     let edata = dmx.read_extradata(size - 40)?;
     if colors > 0 {