summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libffmpegFLAC/decoder.h
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-03-02 13:26:38 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2021-03-02 23:48:05 +0000
commita01721948883d45bc73577a6c8185a5a630ef237 (patch)
tree6e18cff3af0dd4365efab656abfd0c1820f039ce /lib/rbcodec/codecs/libffmpegFLAC/decoder.h
parent7d78958f9d52cf7de921738fb063cdf9a5012699 (diff)
downloadrockbox-a01721948883d45bc73577a6c8185a5a630ef237.tar.gz
rockbox-a01721948883d45bc73577a6c8185a5a630ef237.zip
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
Diffstat (limited to 'lib/rbcodec/codecs/libffmpegFLAC/decoder.h')
-rw-r--r--lib/rbcodec/codecs/libffmpegFLAC/decoder.h11
1 files changed, 6 insertions, 5 deletions
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 @@
3 3
4#include "bitstream.h" 4#include "bitstream.h"
5 5
6#define MAX_CHANNELS 6 /* Maximum supported channels, only left/right will be played back */ 6#define MAX_CHANNELS 6 /* Maximum supported channels, only left/right will be played back */
7#define MAX_BLOCKSIZE 4608 /* Maxsize in samples of one uncompressed frame */ 7#define MAX_BLOCKSIZE 4608 /* Maxsize in samples of one uncompressed frame */
8#define MAX_FRAMESIZE 65536 /* Maxsize in bytes of one compressed frame */ 8#define MAX_FRAMESIZE 65536 /* Maxsize in bytes of one compressed frame */
9#define MIN_FRAME_SIZE 11 /* smallest valid FLAC frame possible */
9 10
10#define FLAC_OUTPUT_DEPTH 29 /* Provide samples left-shifted to 28 bits+sign */ 11#define FLAC_OUTPUT_DEPTH 29 /* Provide samples left-shifted to 28 bits+sign */
11 12
@@ -23,10 +24,10 @@ typedef struct FLACContext {
23 int min_framesize, max_framesize; 24 int min_framesize, max_framesize;
24 int samplerate, channels; 25 int samplerate, channels;
25 int blocksize/*, last_blocksize*/; 26 int blocksize/*, last_blocksize*/;
26 int bps, curr_bps; 27 int bps;
27 unsigned long samplenumber; 28 unsigned long samplenumber;
28 unsigned long totalsamples; 29 unsigned long totalsamples;
29 enum decorrelation_type decorrelation; 30 enum decorrelation_type ch_mode;
30 31
31 int filesize; 32 int filesize;
32 int length; 33 int length;