demux/mkv: fix accidental copy where a reference is needed
authorFilip Roséen <filip@videolabs.io>
Mon, 11 Jul 2016 21:11:36 +0000 (23:11 +0200)
committerThomas Guillem <thomas@gllm.fr>
Tue, 12 Jul 2016 07:22:00 +0000 (09:22 +0200)
This bug caused properties that should be associated with the different
tracks (such as es_format_t.i_priority) to be written to a local copy,
instead of actually propagating to where they should be.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/demux/mkv/matroska_segment.cpp

index 18fdb8b..2160fb5 100644 (file)
@@ -904,8 +904,8 @@ void matroska_segment_c::ComputeTrackPriority()
 
     for( tracks_map_t::iterator it = tracks.begin(); it != tracks.end(); ++it )
     {
-        tracks_map_t::key_type    track_id = it->first;
-        tracks_map_t::mapped_type track    = it->second;
+        tracks_map_t::key_type     track_id = it->first;
+        tracks_map_t::mapped_type& track    = it->second;
 
         if( unlikely( track.fmt.i_cat == UNKNOWN_ES || !track.psz_codec ) )
         {