X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-game%2Fsrc%2Fdemuxers%2Fgdv.rs;h=24a588694bea773776f7705c0be8c11666d5b00f;hp=778329ad451d1e9b7cf6bded3b2847ed6a5c94d5;hb=f84608b7a3c16f682ef9418feddf5b523799e053;hpb=3813fe8a3408aa3b6dcb296ca7203c89f2a6894d 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)));