[vlc-commits] mkv: Avoid duplicating the entire vector.

Hugo Beauzée-Luyssen git at videolan.org
Mon Jun 20 10:49:52 CEST 2011


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue May 24 11:43:59 2011 +0200| [8e451b51e9e93634b3d0f13e8d44c4ff8bc1b000] | committer: Jean-Baptiste Kempf

mkv: Avoid duplicating the entire vector.

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

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

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

diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 836f18d..da65f18 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -263,7 +263,7 @@ chapter_item_c *virtual_segment_c::FindChapter( int64_t i_find_uid )
     return NULL;
 }
 
-void virtual_segment_c::AddSegments(std::vector<matroska_segment_c *> segments)
+void virtual_segment_c::AddSegments( const std::vector<matroska_segment_c *> &segments)
 {
     // fill our current virtual segment with all hard linked segments
     size_t i_preloaded;
diff --git a/modules/demux/mkv/virtual_segment.hpp b/modules/demux/mkv/virtual_segment.hpp
index fd6e2c9..a8c6100 100644
--- a/modules/demux/mkv/virtual_segment.hpp
+++ b/modules/demux/mkv/virtual_segment.hpp
@@ -49,7 +49,7 @@ public:
         AppendUID( p_segment->p_next_segment_uid );
     }
 
-    void AddSegments( std::vector<matroska_segment_c*> segments );
+    void AddSegments( const std::vector<matroska_segment_c*> &segments );
 
     void Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_offset, chapter_item_c *p_chapter, int64_t i_global_position );
 



More information about the vlc-commits mailing list