From a01721948883d45bc73577a6c8185a5a630ef237 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Tue, 2 Mar 2021 13:26:38 -0500 Subject: Nudge flac towards upstream FS#13266 Some flac encoded files contain junk that our decoder picked up upstream has some sign and overflow fixes too Change-Id: I5857b2fe56906a48f04944cdfee8fe2306f2c3fd --- lib/rbcodec/codecs/libffmpegFLAC/decoder.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/rbcodec/codecs/libffmpegFLAC/decoder.h') diff --git a/lib/rbcodec/codecs/libffmpegFLAC/decoder.h b/lib/rbcodec/codecs/libffmpegFLAC/decoder.h index 677a21ac98..7bd021dce6 100644 --- a/lib/rbcodec/codecs/libffmpegFLAC/decoder.h +++ b/lib/rbcodec/codecs/libffmpegFLAC/decoder.h @@ -3,9 +3,10 @@ #include "bitstream.h" -#define MAX_CHANNELS 6 /* 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 MAX_CHANNELS 6 /* 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 */ #define FLAC_OUTPUT_DEPTH 29 /* Provide samples left-shifted to 28 bits+sign */ @@ -23,10 +24,10 @@ typedef struct FLACContext { int min_framesize, max_framesize; int samplerate, channels; int blocksize/*, last_blocksize*/; - int bps, curr_bps; + int bps; unsigned long samplenumber; unsigned long totalsamples; - enum decorrelation_type decorrelation; + enum decorrelation_type ch_mode; int filesize; int length; -- cgit v1.2.3