[vlc-devel] [PATCH] demux/mkv: fix accidental copy where a reference is needed
Filip Roséen
filip at videolabs.io
Mon Jul 11 23:11:36 CEST 2016
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.
--
Me (ascii-art):
___________.._______
| .__________))______|
| | / / ||
| |/ / ||
| | / ||.-''.
| |/ |/ _ \
| | || `/,|
| | (\\`_.'
| | .-`--'.
| | /Y . . Y\
| | // | | \\
| | // | . | \\
| | ') | | (`
| | ||'||
| | || ||
| | || ||
| | || ||
| | / | | \
""""""""""|_`-' `-' |"""|
|"|"""""""\ \ '"|"|
| | \ \ | |
: : \ \ : :
. . `' . .
---
modules/demux/mkv/matroska_segment.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 18fdb8b..2160fb5 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -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 ) )
{
--
2.9.0
More information about the vlc-devel
mailing list