fdkaacdec: Support up to 5 rear channels
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Thu, 25 May 2023 15:02:24 +0000 (17:02 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 30 May 2023 15:31:22 +0000 (16:31 +0100)
The `switch (n_rear)` supports up to 5 rear channels, but our channel
set only had space for 3. Size the set properly to fix this.

This didn't actually cause any memory unsafety as `PUSH_CHAN` would stop
incrementing `n_rear` if the channel set is already full.

Thanks to @alatiera for noticing this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4740>

subprojects/gst-plugins-bad/ext/fdkaac/gstfdkaacdec.c

index 8924b81..e43a2f0 100644 (file)
@@ -237,7 +237,7 @@ gst_fdkaacdec_map_channels (GstFdkAacDec * self, const CStreamInfo * in,
 
   DEF_CHANSET (front, 7);
   DEF_CHANSET (side, 2);
-  DEF_CHANSET (rear, 3);
+  DEF_CHANSET (rear, 5);
   DEF_CHANSET (lfe, 2);
   DEF_CHANSET (top_front, 3);
   DEF_CHANSET (top_center, 3);