vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Wed Feb 14 13:25:50 
2018 +0100| [ab042aa7a8befcf9fe80b5f46fb5320bfe7a0230] | committer: Steve Lhomme

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

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

 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 e622eb0654..c8584b1b71 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -531,7 +531,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);

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to