[vlc-devel] [PATCH] Avoid a crash if there are duplicated files in dir

Denis Charmet typx at dinauz.org
Fri Feb 17 17:44:44 CET 2012


---
 modules/demux/mkv/demux.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index f63d352..658dc31 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -528,10 +528,10 @@ matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlS
                         {
                             KaxSegmentUID *p_uid = static_cast<KaxSegmentUID*>(l);
                             b_keep_segment = (FindSegment( *p_uid ) == NULL);
-                            if ( !b_keep_segment )
-                                break; // this segment is already known
                             delete p_segment1->p_segment_uid;
                             p_segment1->p_segment_uid = new KaxSegmentUID(*p_uid);
+                            if ( !b_keep_segment )
+                                break; // this segment is already known
                         }
                         else if( MKV_IS_ID( l, KaxPrevUID ) )
                         {
-- 
1.7.1





More information about the vlc-devel mailing list