From d5f4d49ef2c8f8e4f3ef0642b3561a53f66dffac Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 30 Oct 2019 18:34:55 +0100 Subject: [PATCH] dec_video: care about PTS only in the decoded stream --- nihav-core/src/test/dec_video.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.30.2