From: Kostya Shishkov Date: Wed, 30 Oct 2019 17:34:55 +0000 (+0100) Subject: dec_video: care about PTS only in the decoded stream X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=d5f4d49ef2c8f8e4f3ef0642b3561a53f66dffac;p=nihav.git dec_video: care about PTS only in the decoded stream --- diff --git a/nihav-core/src/test/dec_video.rs b/nihav-core/src/test/dec_video.rs index dfefdc4..da29429 100644 --- a/nihav-core/src/test/dec_video.rs +++ b/nihav-core/src/test/dec_video.rs @@ -182,11 +182,11 @@ pub fn test_file_decoding(demuxer: &str, name: &str, limit: Option, panic!("error"); } let pkt = pktres.unwrap(); - if let (Some(lim), Some(ppts)) = (limit, pkt.get_pts()) { - if ppts > lim { break; } - } let streamno = pkt.get_stream().get_id() as usize; if let Some((ref mut dsupp, ref mut dec)) = decs[streamno] { + if let (Some(lim), Some(ppts)) = (limit, pkt.get_pts()) { + if ppts > lim { break; } + } let frm = dec.decode(dsupp, &pkt).unwrap(); if pkt.get_stream().get_info().is_video() && video_pfx.is_some() && frm.get_frame_type() != FrameType::Skip { let pfx = video_pfx.unwrap();