From: Kostya Shishkov Date: Sat, 3 Jun 2023 08:42:19 +0000 (+0200) Subject: y4m: if no colourspace is specified it should be YUV 4:2:0 X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=210f21b33136c0d4ed0c8e2dd02ffc7c9c518fc1;p=nihav.git y4m: if no colourspace is specified it should be YUV 4:2:0 --- diff --git a/nihav-commonfmt/src/demuxers/y4m.rs b/nihav-commonfmt/src/demuxers/y4m.rs index 9340421..89bf933 100644 --- a/nihav-commonfmt/src/demuxers/y4m.rs +++ b/nihav-commonfmt/src/demuxers/y4m.rs @@ -85,7 +85,7 @@ impl<'a> Y4MDemuxer<'a> { } } fn parse_header(&mut self) -> DemuxerResult { - let mut format = RGB24_FORMAT; + let mut format = YUV420_FORMAT; let mut magic = [0u8; 10]; self.src.read_buf(&mut magic)?; @@ -149,7 +149,7 @@ impl<'a> Y4MDemuxer<'a> { break; } } - validate!(self.width > 0 && self.height > 0 && format.model.is_yuv()); + validate!(self.width > 0 && self.height > 0); self.frame_size = 0; for chromaton in format.comp_info.iter() { if let Some(ref chr) = chromaton {