diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-10-30 18:34:55 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-10-30 18:34:55 +0100 |
commit | d5f4d49ef2c8f8e4f3ef0642b3561a53f66dffac (patch) | |
tree | d53c174bee62ad301974d017eb9b9b15183432f6 | |
parent | 587a6d789be865f24bd31ef65aabf1b9d5809965 (diff) | |
download | nihav-d5f4d49ef2c8f8e4f3ef0642b3561a53f66dffac.tar.gz |
dec_video: care about PTS only in the decoded stream
-rw-r--r-- | nihav-core/src/test/dec_video.rs | 6 |
1 files 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<u64>, 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(); |