[vlc-commits] mkv: only create a spoint vector if we're going to use it

Steve Lhomme git at videolan.org
Wed Mar 16 07:04:40 CET 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Mar 15 15:45:55 2016 +0100| [4823f0561dc59765891f67e447aea36acd4d82b7] | committer: Jean-Baptiste Kempf

mkv: only create a spoint vector if we're going to use it

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

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

 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;



More information about the vlc-commits mailing list