[vlc-devel] [PATCH 2/9] mkv: only create a spoint vector if we're going to use it

Steve Lhomme robux4 at videolabs.io
Tue Mar 15 15:45:55 CET 2016


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

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 7473668..4806eb7 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -765,8 +765,6 @@ void matroska_segment_c::Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int6
     int i_cat;
     bool b_has_key = false;
 
-    std::vector<spoint> spoints;
-
     for( size_t i = 0; i < tracks.size(); i++)
         tracks[i]->i_last_dts = VLC_TS_INVALID;
 
@@ -846,6 +844,7 @@ void matroska_segment_c::Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int6
     sys.i_start_pts = i_mk_date + VLC_TS_0;
 
     /* now parse until key frame */
+    std::vector<spoint> spoints;
     const int es_types[3] = { VIDEO_ES, AUDIO_ES, SPU_ES };
     i_cat = es_types[0];
     mtime_t i_seek_preroll = 0;
-- 
2.7.2.windows.1



More information about the vlc-devel mailing list