[vlc-commits] demux:mkv: improve Cues loading dramatically
Steve Lhomme
git at videolan.org
Tue Feb 13 11:38:17 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb 13 09:16:29 2018 +0100| [8b0547a29dad0c0f189726ac0ec35eeebdb9343e] | committer: Hugo Beauzée-Luyssen
demux:mkv: improve Cues loading dramatically
By reading the data we ignore, rather than skipping over the data.
(cherry picked from commit 419dcfcdd7639cdaf2bb3932a4eac5085ee04a2c)
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=8b0547a29dad0c0f189726ac0ec35eeebdb9343e
---
modules/demux/mkv/matroska_segment.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 75dfb3abd1..a8ebd8b76d 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -166,21 +166,25 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
VLC_UNUSED( kcbn_ptr );
}
#if LIBMATROSKA_VERSION >= 0x010401
- else if( MKV_IS_ID( el, KaxCueRelativePosition ) )
+ else if( MKV_CHECKED_PTR_DECL( ignored, KaxCueRelativePosition, el ) )
{
// IGNORE
+ ignored->ReadData( es.I_O() );
}
- else if( MKV_IS_ID( el, KaxCueBlockNumber ) )
+ else if( MKV_CHECKED_PTR_DECL( ignored, KaxCueBlockNumber, el ) )
{
// IGNORE
+ ignored->ReadData( es.I_O() );
}
- else if( MKV_IS_ID( el, KaxCueReference ) )
+ else if( MKV_CHECKED_PTR_DECL( ignored, KaxCueReference, el ) )
{
// IGNORE
+ ignored->ReadData( es.I_O(), SCOPE_ALL_DATA );
}
- else if( MKV_IS_ID( el, KaxCueDuration ) )
+ else if( MKV_CHECKED_PTR_DECL( ignored, KaxCueDuration, el ) )
{
/* For future use */
+ ignored->ReadData( es.I_O() );
}
#endif
else
More information about the vlc-commits
mailing list