]> git.nihav.org Git - nihav.git/commitdiff
rmdec: ignore parse errors if data position is known already
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 27 Oct 2018 16:58:09 +0000 (18:58 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 27 Oct 2018 16:58:09 +0000 (18:58 +0200)
src/demuxers/realmedia.rs

index 571f97bade449578c0d7d04ce67aa3c3e911b4e1..e56a66b34188844482598c26dff6eb1e610081d3 100644 (file)
@@ -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);