Skip to content

Truly independent web browser

LibMedia: Actually check AVChannel order to switch to custom layouts

Zaggy10240f27feee6512
diff --git a/Libraries/LibMedia/FFmpeg/FFmpegChannelLayout.cpp b/Libraries/LibMedia/FFmpeg/FFmpegChannelLayout.cpp
index 9bf5a707fdb..9cc77a965a7 100644
--- a/Libraries/LibMedia/FFmpeg/FFmpegChannelLayout.cpp
+++ b/Libraries/LibMedia/FFmpeg/FFmpegChannelLayout.cpp
@@ -126,6 +126,7 @@ ErrorOr<AVChannelLayout> channel_map_to_av_channel_layout(FFmpegFunctions const&
if (channel <= last_channel)
return channel_map_to_custom_av_channel_layout(functions, channel_map);
layout.u.mask |= 1ULL << channel;
+ last_channel = channel;
}
return layout;