aboutsummaryrefslogtreecommitdiffstats
path: root/src/demux.rs
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2022-01-09 12:21:50 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2022-01-09 12:21:50 +0100
commit1517a97ddc5d38c18d1a1ca0267156909fd740ab (patch)
treea3069018b664b511ed4478a9056844efccd83d03 /src/demux.rs
parent18f43812ae740cce5834cf8f2a334ea4db9c21f1 (diff)
downloadnihav-tool-1517a97ddc5d38c18d1a1ca0267156909fd740ab.tar.gz
fix detection for small raw streams
Diffstat (limited to 'src/demux.rs')
-rw-r--r--src/demux.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/demux.rs b/src/demux.rs
index a058068..e274e71 100644
--- a/src/demux.rs
+++ b/src/demux.rs
@@ -147,7 +147,8 @@ impl<'a> DemuxerObject<'a> {
}
br.seek(SeekFrom::Start(0)).unwrap();
let mut buf = vec![0; 1048576];
- let size = br.peek_buf(&mut buf).unwrap();
+ let size = br.read_buf_some(&mut buf).unwrap();
+ br.seek(SeekFrom::Start(0)).unwrap();
let mut pname = "";
for pinfo in reg.pkt_reg.iter() {