[vlc-devel] [PATCH 08/11] demux:mkv: read the CRC32 silently (to avoid a seek)

Steve Lhomme robux4 at ycbcr.xyz
Tue Jan 2 16:38:15 CET 2018


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

diff --git a/modules/demux/mkv/matroska_segment_seeker.cpp b/modules/demux/mkv/matroska_segment_seeker.cpp
index 2887e45454..dc4d0ea088 100644
--- a/modules/demux/mkv/matroska_segment_seeker.cpp
+++ b/modules/demux/mkv/matroska_segment_seeker.cpp
@@ -475,6 +475,10 @@ SegmentSeeker::mkv_jump_to( matroska_segment_c& ms, fptr_t fpos )
             ms.cluster->InitTimecode( static_cast<uint64>( *p_tc ), ms.i_timescale );
             break;
         }
+        else if( MKV_CHECKED_PTR_DECL( p_tc, EbmlCrc32, el ) )
+        {
+            p_tc->ReadData( ms.es.I_O(), SCOPE_ALL_DATA ); /* avoid a skip that may fail */
+        }
     }
 
     /* TODO: add error handling; what if we never get a KaxCluster and/or KaxClusterTimecode? */
-- 
2.14.2



More information about the vlc-devel mailing list