From 210f21b33136c0d4ed0c8e2dd02ffc7c9c518fc1 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 3 Jun 2023 10:42:19 +0200 Subject: [PATCH] y4m: if no colourspace is specified it should be YUV 4:2:0 --- nihav-commonfmt/src/demuxers/y4m.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 { -- 2.39.5