From: Kostya Shishkov Date: Sun, 9 Jan 2022 11:21:50 +0000 (+0100) Subject: fix detection for small raw streams X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=1517a97ddc5d38c18d1a1ca0267156909fd740ab;p=nihav-tool.git fix detection for small raw streams --- 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() {