[vlc-commits] demux:mkv: do not read further segments if we can't seek back

Steve Lhomme git at videolan.org
Wed Feb 14 16:48:20 CET 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 14 13:25:50 2018 +0100| [7a009f1e589ae77d3e37f4e3738ac7e5642e969a] | committer: Hugo Beauzée-Luyssen

demux:mkv: do not read further segments if we can't seek back

(cherry picked from commit ab042aa7a8befcf9fe80b5f46fb5320bfe7a0230)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=7a009f1e589ae77d3e37f4e3738ac7e5642e969a
---

 modules/demux/mkv/demux.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 98092eed44..aea6937664 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -528,7 +528,10 @@ bool demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, matroska_stream_c *
 
         EbmlElement* p_l0_prev = p_l0;
 
-        if (p_l0->IsFiniteSize() )
+        bool b_seekable;
+        vlc_stream_Control( demuxer.s, STREAM_CAN_SEEK, &b_seekable );
+
+        if (p_l0->IsFiniteSize() && b_seekable )
         {
             p_l0->SkipData(p_stream1->estream, KaxMatroska_Context);
             p_l0 = p_stream1->estream.FindNextID(EBML_INFO(KaxSegment), UINT64_MAX);



More information about the vlc-commits mailing list