1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Solomon Peachy 2024-10-14 11:03:28 -04:00
parent ef19fa4408
commit 3aef933348

View file

@ -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;