aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2021-02-24 11:27:27 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2021-02-24 11:27:27 +0100
commitf84608b7a3c16f682ef9418feddf5b523799e053 (patch)
treefdc1651114ac418997089178220330a702c34c1e
parent3813fe8a3408aa3b6dcb296ca7203c89f2a6894d (diff)
downloadnihav-f84608b7a3c16f682ef9418feddf5b523799e053.tar.gz
gdv: recognize 16-bit video streams
-rw-r--r--nihav-game/src/demuxers/gdv.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/nihav-game/src/demuxers/gdv.rs b/nihav-game/src/demuxers/gdv.rs
index 778329a..24a5886 100644
--- a/nihav-game/src/demuxers/gdv.rs
+++ b/nihav-game/src/demuxers/gdv.rs
@@ -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)));