[vlc-commits] demux: mkv: don't use the segment UID if it's NULL

Steve Lhomme git at videolan.org
Tue May 29 12:08:29 CEST 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue May 29 11:05:29 2018 +0200| [d2dadb37e7acc25ae08df71e563855d6e17b5b42] | committer: Jean-Baptiste Kempf

demux: mkv: don't use the segment UID if it's NULL

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

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

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

diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index d42115b7f5..f95d9b9c07 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -509,9 +509,8 @@ bool demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, matroska_stream_c *
 
             p_segment1->Preload();
 
-            b_keep_segment = (FindSegment( *p_segment1->p_segment_uid ) == NULL);
-
-            if ( b_keep_segment || !p_segment1->p_segment_uid )
+            if ( !p_segment1->p_segment_uid ||
+                 (b_keep_segment = (FindSegment( *p_segment1->p_segment_uid ) == NULL)))
             {
                 opened_segments.push_back( p_segment1 );
                 b_keep_stream = true;



More information about the vlc-commits mailing list