self.bw.write_u32le(0)?;
self.bw.write_u32le(vinfo.width as u32)?;
self.bw.write_u32le(vinfo.height as u32)?;
- self.bw.write_u16le(vinfo.format.components as u16)?;
- self.bw.write_u16le(vinfo.format.get_total_depth() as u16)?;
+ if !vinfo.format.palette {
+ self.bw.write_u16le(vinfo.format.components as u16)?;
+ self.bw.write_u16le(vinfo.format.get_total_depth() as u16)?;
+ } else {
+ self.bw.write_u16le(1)?;
+ self.bw.write_u16le(8)?;
+ }
let fcc = find_avi_fourcc(str.get_info().get_name());
if fcc.is_none() {
return Err(MuxerError::UnsupportedFormat);