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

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Sep 11 11:23:14 UTC 2026



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
628fb0f1 by Steve Lhomme at 2026-09-11T09:39:52+00:00
demux: mkv: only apply channel reordering on raw ACM codecs

Similar to what is done in wav.c.

Fixes #30061

(cherry picked from commit f8602bafe0acc90e2cd93dce9208839b04ce8a68)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -
b68aebe0 by Steve Lhomme at 2026-09-11T09:39:52+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.

(cherry picked from commit 4e00fb427fb69112db511a7708d642cd6431b990)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


1 changed file:

- modules/demux/mkv/matroska_segment_parse.cpp


Changes:

=====================================
modules/demux/mkv/matroska_segment_parse.cpp
=====================================
@@ -1822,17 +1822,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/bcaeca1281c4c6f5990a8d7120b9c79422f537d8...b68aebe0f895636af83574b23dbb795594487a73

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bcaeca1281c4c6f5990a8d7120b9c79422f537d8...b68aebe0f895636af83574b23dbb795594487a73
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