[vlc-commits] demux:mkv: read the CRC32 silently (to avoid a seek)

Steve Lhomme git at videolan.org
Mon Mar 19 13:36:04 CET 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jan  2 16:38:15 2018 +0100| [c3fccebf062c685785470290623b47c66124cc28] | committer: Steve Lhomme

demux:mkv: read the CRC32 silently (to avoid a seek)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit e397f09756443d54d86783505fab7ef75592cb48)

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

 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 7304e79e82..3f28ae2997 100644
--- a/modules/demux/mkv/matroska_segment_seeker.cpp
+++ b/modules/demux/mkv/matroska_segment_seeker.cpp
@@ -501,6 +501,10 @@ SegmentSeeker::mkv_jump_to( matroska_segment_c& ms, fptr_t fpos )
             add_cluster(ms.cluster);
             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? */



More information about the vlc-commits mailing list