From: Kostya Shishkov Date: Sat, 27 Oct 2018 16:58:09 +0000 (+0200) Subject: rmdec: ignore parse errors if data position is known already X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=b7b96b4cabbde72f05d0464299bf7fdf74d6480c;p=nihav.git rmdec: ignore parse errors if data position is known already --- 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);