[vlc-commits] MKV: avoid recursive parsing of the same Seek head

Steve Lhomme git at videolan.org
Sat Feb 28 10:58:55 CET 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Feb 27 15:43:56 2015 +0100| [988d377360743d761564c26b50b7a03cf633a06f] | committer: Jean-Baptiste Kempf

MKV: avoid recursive parsing of the same Seek head

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/mkv/matroska_segment.cpp |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 617ad02..395833c 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -776,8 +776,11 @@ bool matroska_segment_c::LoadSeekHeadItem( const EbmlCallbacks & ClassInfos, int
         msg_Dbg( &sys.demuxer, "|   + Seek head" );
         if( i_seekhead_count < 10 )
         {
-            i_seekhead_position = i_element_position;
-            ParseSeekHead( static_cast<KaxSeekHead*>( el ) );
+            if ( i_seekhead_position != i_element_position )
+            {
+                i_seekhead_position = i_element_position;
+                ParseSeekHead( static_cast<KaxSeekHead*>( el ) );
+            }
         }
     }
     else if( MKV_IS_ID( el, KaxInfo ) ) // FIXME



More information about the vlc-commits mailing list