aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2018-09-06 11:01:09 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2018-09-06 11:01:09 +0200
commitcd9ece3c2316fe74631e33347328dfe3d8d21a65 (patch)
treef7ff6b3b113ac548c1420e6bfe4de596c3d3ad47
parent3660c127f52a92862248464767a3d92cf63aa182 (diff)
downloadnihav-tool-cd9ece3c2316fe74631e33347328dfe3d8d21a65.tar.gz
misc small improvements
-rw-r--r--src/frmwriter.rs4
-rw-r--r--src/main.rs3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/frmwriter.rs b/src/frmwriter.rs
index ac0c7b5..d4ea654 100644
--- a/src/frmwriter.rs
+++ b/src/frmwriter.rs
@@ -7,7 +7,7 @@ use std::cell::Ref;
pub fn write_pgmyuv(pfx: &str, strno: usize, num: u64, frm: Ref<NAFrame>) {
if let NABufferType::None = frm.get_buffer() { return; }
- let name = format!("{}out{:02}_{:04}.pgm", pfx, strno, num);
+ let name = format!("{}out{:02}_{:08}.pgm", pfx, strno, num);
let mut ofile = File::create(name).unwrap();
let buf = frm.get_buffer().get_vbuf().unwrap();
let (w, h) = buf.get_dimensions(0);
@@ -48,7 +48,7 @@ pub fn write_pgmyuv(pfx: &str, strno: usize, num: u64, frm: Ref<NAFrame>) {
}
pub fn write_palppm(pfx: &str, strno: usize, num: u64, frm: Ref<NAFrame>) {
- let name = format!("{}out{:02}_{:04}.ppm", pfx, strno, num);
+ let name = format!("{}out{:02}_{:08}.ppm", pfx, strno, num);
let mut ofile = File::create(name).unwrap();
let buf = frm.get_buffer().get_vbuf().unwrap();
let (w, h) = buf.get_dimensions(0);
diff --git a/src/main.rs b/src/main.rs
index 0200590..c1f4428 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -83,7 +83,6 @@ fn main() {
}
let name = args[cur_arg].as_str();
cur_arg += 1;
-println!(" name = {} arg pos {}/{}", name, cur_arg, args.len());
if cur_arg < args.len() {
lastpts = Some(u64::from_str_radix(args[cur_arg].as_str(), 10).unwrap());
}
@@ -163,7 +162,7 @@ panic!("decoder {} not found", info.get_name());
};
}
}
- if pkt.get_pts() != None && pkt.get_pts() == lastpts { break; }
+ if pkt.get_pts() != None && pkt.get_pts() >= lastpts { break; }
}
//panic!("end");
}