From cbeb244fb97e8612e59f5a78624389f67f8f881e Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 30 Jun 2024 14:10:18 +0200 Subject: [PATCH] imgseq: always use rawvideo rawvideo-ms requires a padding to multiple of 4 and thus not always suitable --- src/imgseq.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imgseq.rs b/src/imgseq.rs index d3948b5..7de339b 100644 --- a/src/imgseq.rs +++ b/src/imgseq.rs @@ -172,7 +172,7 @@ impl<'a> ImgSeqDemuxerCreator<'a> { if let Ok(file) = File::open(fname.as_str()) { let mut file = BufReader::new(file); let vinfo = read_pnm_header(&mut file, self.pgmyuv)?; - let cinfo = NACodecInfo::new(if vinfo.format.model.is_yuv() { "rawvideo" } else { "rawvideo-ms" }, NACodecTypeInfo::Video(vinfo), None); + let cinfo = NACodecInfo::new("rawvideo", NACodecTypeInfo::Video(vinfo), None); let stream = NAStream::new(StreamType::Video, 0, cinfo, self.tb_num, self.tb_den, 0).into_ref(); return Ok(ImgSeqDemuxer::new(stream, self.start.unwrap_or(0), template, self.pgmyuv)); } @@ -184,7 +184,7 @@ impl<'a> ImgSeqDemuxerCreator<'a> { if let Ok(file) = File::open(fname.as_str()) { let mut file = BufReader::new(file); let vinfo = read_pnm_header(&mut file, self.pgmyuv)?; - let cinfo = NACodecInfo::new(if vinfo.format.model.is_yuv() { "rawvideo" } else { "rawvideo-ms" }, NACodecTypeInfo::Video(vinfo), None); + let cinfo = NACodecInfo::new("rawvideo", NACodecTypeInfo::Video(vinfo), None); let stream = NAStream::new(StreamType::Video, 0, cinfo, self.tb_num, self.tb_den, 0).into_ref(); return Ok(ImgSeqDemuxer::new(stream, new_start, template, self.pgmyuv)); } -- 2.39.2