]> git.nihav.org Git - nihav-player.git/commitdiff
sndplay: fix small raw streams detection
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 9 Jan 2022 11:23:06 +0000 (12:23 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 9 Jan 2022 11:23:06 +0000 (12:23 +0100)
sndplay/src/demux.rs

index de9a06739df8bae6721d63ae64bee1b5974cd173..9878500ae7a21710af2561f31cd2f685e370a7da 100644 (file)
@@ -126,7 +126,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() {