From b7b96b4cabbde72f05d0464299bf7fdf74d6480c Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 27 Oct 2018 18:58:09 +0200 Subject: [PATCH] rmdec: ignore parse errors if data position is known already --- src/demuxers/realmedia.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/demuxers/realmedia.rs b/src/demuxers/realmedia.rs index 571f97b..e56a66b 100644 --- a/src/demuxers/realmedia.rs +++ b/src/demuxers/realmedia.rs @@ -738,7 +738,11 @@ impl<'a> RealMediaDemuxer<'a> { match res { Ok(last) => { if last { break; } }, Err(DemuxerError::IOError) => { break; }, - Err(etype) => { return Err(etype); }, + Err(etype) => { + if self.data_pos == 0 { // data is not found, report error + return Err(etype); + } + }, }; } //println!("now @ {:X} / {}", self.src.tell(), self.data_pos); -- 2.39.5