[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: mkv: only apply channel reordering on raw ACM codecs

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Sep 8 09:04:20 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f8602baf by Steve Lhomme at 2026-09-08T08:54:58+00:00
demux: mkv: only apply channel reordering on raw ACM codecs

Similar to what is done in wav.c.

Fixes #30061

- - - - -
4e00fb42 by Steve Lhomme at 2026-09-08T08:54:58+00:00
demux: mkv: do raw codec mapping after raw channel reordering

Otherwise we need to test the raw formats output by vlc_fourcc_GetCodecAudio().
And then it doesn't match the code in wav.c.

- - - - -


1 changed file:

- modules/demux/mkv/matroska_segment_parse.cpp


Changes:

=====================================
modules/demux/mkv/matroska_segment_parse.cpp
=====================================
@@ -2044,17 +2044,22 @@ bool matroska_segment_c::TrackInit( mkv_track_t * p_tk )
                         }
 
 
-                        p_tk->fmt.i_codec = vlc_fourcc_GetCodecAudio( p_tk->fmt.i_codec,
-                                                                      p_tk->fmt.audio.i_bitspersample );
                         if( i_channel_mask )
                         {
-                            p_tk->i_chans_to_reorder = aout_CheckChannelReorder(
-                                pi_channels_aout, NULL,
-                                i_channel_mask,
-                                p_tk->pi_chan_table );
+                            if ( p_tk->fmt.i_codec == VLC_FOURCC('a','r','a','w') ||
+                                 p_tk->fmt.i_codec == VLC_FOURCC('a','f','l','t') )
+                            {
+                                p_tk->i_chans_to_reorder = aout_CheckChannelReorder(
+                                    pi_channels_aout, NULL,
+                                    i_channel_mask,
+                                    p_tk->pi_chan_table );
+                            }
 
                             p_tk->fmt.audio.i_physical_channels = i_channel_mask;
                         }
+
+                        p_tk->fmt.i_codec = vlc_fourcc_GetCodecAudio( p_tk->fmt.i_codec,
+                                                                      p_tk->fmt.audio.i_bitspersample );
                     }
                 }
                 else



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f277d35fae155eb49cc14e402e2dc8267fc79603...4e00fb427fb69112db511a7708d642cd6431b990

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f277d35fae155eb49cc14e402e2dc8267fc79603...4e00fb427fb69112db511a7708d642cd6431b990
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list