From 3aef933348eaffd838f0dfb38f6c4a76c0a19420 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Mon, 14 Oct 2024 11:03:28 -0400 Subject: [PATCH] flac: Bump maximum channel count to 7 (FS#13306) This is actually the root fix for the crash; the fix in 772eff8ca6 didn't restrict it to 2 channels, just sanity checked the file vs MAX_CHANNELS. Change-Id: If5a0a9b946a179ad47d6e7955f7c025de3aaaa0e --- lib/rbcodec/codecs/libffmpegFLAC/decoder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rbcodec/codecs/libffmpegFLAC/decoder.h b/lib/rbcodec/codecs/libffmpegFLAC/decoder.h index 7bd021dce6..856bf65066 100644 --- a/lib/rbcodec/codecs/libffmpegFLAC/decoder.h +++ b/lib/rbcodec/codecs/libffmpegFLAC/decoder.h @@ -1,9 +1,9 @@ #ifndef _FLAC_DECODER_H #define _FLAC_DECODER_H - + #include "bitstream.h" -#define MAX_CHANNELS 6 /* Maximum supported channels, only left/right will be played back */ +#define MAX_CHANNELS 7 /* Maximum supported channels, only left/right will be played back */ #define MAX_BLOCKSIZE 4608 /* Maxsize in samples of one uncompressed frame */ #define MAX_FRAMESIZE 65536 /* Maxsize in bytes of one compressed frame */ #define MIN_FRAME_SIZE 11 /* smallest valid FLAC frame possible */ @@ -33,13 +33,13 @@ typedef struct FLACContext { int length; int bitrate; int metadatalength; - + int bitstream_size; int bitstream_index; int sample_skip; int framesize; - + int32_t *decoded[MAX_CHANNELS]; } FLACContext;