[vlc-commits] MKV: Don't ignore user preferences for track selection

Denis Charmet git at videolan.org
Wed Mar 14 12:10:07 CET 2012


vlc/vlc-2.0 | branch: master | Denis Charmet <typx at dinauz.org> | Tue Mar 13 22:29:02 2012 +0100| [6cc4d347d3fdc2b2b6479792e02d5395defae822] | committer: Jean-Baptiste Kempf

MKV: Don't ignore user preferences for track selection

Fix #6375

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 22c24d5aaf7a41f8f0a3beb49039ec8415767263)

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

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=6cc4d347d3fdc2b2b6479792e02d5395defae822
---

 modules/demux/mkv/matroska_segment.cpp |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 16557e6..4274ccb 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -1362,11 +1362,15 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
         if( unlikely( !p_tk->b_enabled ) )
             p_tk->fmt.i_priority = -2;
         else if( p_tk->b_forced )
-            p_tk->fmt.i_priority = 1;
+            p_tk->fmt.i_priority = 2;
         else if( p_tk->b_default )
-            p_tk->fmt.i_priority = 0;
+            p_tk->fmt.i_priority = 1;
         else
-            p_tk->fmt.i_priority = -1;
+            p_tk->fmt.i_priority = 0;
+
+        /* Avoid multivideo tracks when unnecessary */
+        if( p_tk->fmt.i_cat == VIDEO_ES )
+            p_tk->fmt.i_priority--;
 
         p_tk->p_es = es_out_Add( sys.demuxer.out, &p_tk->fmt );
 



More information about the vlc-commits mailing list