]> git.nihav.org Git - nihav.git/commitdiff
gdv: recognize 16-bit video streams
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 24 Feb 2021 10:27:27 +0000 (11:27 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 24 Feb 2021 10:27:27 +0000 (11:27 +0100)
nihav-game/src/demuxers/gdv.rs

index 778329ad451d1e9b7cf6bded3b2847ed6a5c94d5..24a588694bea773776f7705c0be8c11666d5b00f 100644 (file)
@@ -78,7 +78,7 @@ impl<'a> DemuxCore<'a> for GremlinVideoDemuxer<'a> {
                 edata.resize(768, 0);
                 src.read_buf(edata.as_mut_slice())?;
             }
-            let vhdr = NAVideoInfo::new(width as usize, height as usize, false, PAL8_FORMAT);
+            let vhdr = NAVideoInfo::new(width as usize, height as usize, false, if depth < 2 { PAL8_FORMAT } else { RGB565_FORMAT });
             let vci = NACodecTypeInfo::Video(vhdr);
             let vinfo = NACodecInfo::new("gdv-video", vci, if edata.is_empty() { None } else { Some(edata) });
             self.v_id = strmgr.add_stream(NAStream::new(StreamType::Video, 0, vinfo, 1, u32::from(fps), u64::from(frames)));