y4m: if no colourspace is specified it should be YUV 4:2:0
[nihav.git] / nihav-commonfmt / src / demuxers / y4m.rs
index 9340421743c5fac3e39d3499d11b065f2a571fb9..89bf933025c49996d1fe7236ca594b8f00d03a8e 100644 (file)
@@ -85,7 +85,7 @@ impl<'a> Y4MDemuxer<'a> {
         }
     }
     fn parse_header(&mut self) -> DemuxerResult<NAPixelFormaton> {
-        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 {