[vlc-commits] demux:mkv: don't read the first Cluster if we can't seek back

Steve Lhomme git at videolan.org
Wed Feb 14 13:46:23 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 14 13:21:02 2018 +0100| [afdf229fa903a4a3c4d0d67502c5efa1bdec237f] | committer: Steve Lhomme

demux:mkv: don't read the first Cluster if we can't seek back

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

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

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 81b674b62d..63cf64e346 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1415,6 +1415,11 @@ bool matroska_segment_c::ParseCluster( KaxCluster *cluster, bool b_update_start_
         return false;
     }
 
+    bool b_seekable;
+    vlc_stream_Control( sys.demuxer.s, STREAM_CAN_SEEK, &b_seekable );
+    if (!b_seekable)
+        return false;
+
     try
     {
         EbmlElement *el;



More information about the vlc-commits mailing list