]> git.nihav.org Git - nihav-player.git/commitdiff
videoplayer: explicitly mark unused streams
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 4 Feb 2026 17:24:40 +0000 (18:24 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 4 Feb 2026 17:24:40 +0000 (18:24 +0100)
videoplayer/src/main.rs

index abfa35f1f8365ec9ebdaa7b27c34bfbdad5c8fb3..061b802a772ed01472714ab27e8b5ec634b11a22 100644 (file)
@@ -898,6 +898,15 @@ impl Player {
             return window;
         }
 
+        for i in 0..dmx.get_num_streams() {
+            let s = dmx.get_stream(i).unwrap();
+            let str_id = s.get_id();
+            if !(self.has_video && str_id == self.video_str) &&
+               !(self.has_audio && str_id == self.audio_str) {
+                dmx.set_ignored_stream(i);
+            }
+        }
+
         match self.sc_size {
             ScaleSize::Auto if self.thr_w > 0 && self.thr_h > 0 => {
                 while (width <= self.thr_w) && (height <= self.thr_h) {