From 1517a97ddc5d38c18d1a1ca0267156909fd740ab Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 9 Jan 2022 12:21:50 +0100 Subject: [PATCH] fix detection for small raw streams --- src/demux.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() { -- 2.39.5