From: Kostya Shishkov Date: Wed, 24 Feb 2021 10:27:27 +0000 (+0100) Subject: gdv: recognize 16-bit video streams X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=f84608b7a3c16f682ef9418feddf5b523799e053;p=nihav.git gdv: recognize 16-bit video streams --- 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)));