]> git.sesse.net Git - vlc/commitdiff
MKV: avoid recursive parsing of the same Seek head
authorSteve Lhomme <robUx4@videolabs.io>
Fri, 27 Feb 2015 14:43:56 +0000 (15:43 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 28 Feb 2015 09:58:16 +0000 (10:58 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/matroska_segment.cpp

index 617ad021e4cf342ed6c194ed054dee7d173156da..395833c38ce7e4cc4d47037406efd67bf817ecd0 100644 (file)
@@ -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