summaryrefslogtreecommitdiff
path: root/src/combined/decoder_flac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/combined/decoder_flac.c')
-rw-r--r--src/combined/decoder_flac.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/combined/decoder_flac.c b/src/combined/decoder_flac.c
index fe1822797..b8650810b 100644
--- a/src/combined/decoder_flac.c
+++ b/src/combined/decoder_flac.c
@@ -72,9 +72,9 @@ typedef struct flac_decoder_s {
int channels;
unsigned char *buf;
- int buf_size;
- int buf_pos;
- int min_size;
+ size_t buf_size;
+ size_t buf_pos;
+ size_t min_size;
} flac_decoder_t;
@@ -82,23 +82,31 @@ typedef struct flac_decoder_s {
* FLAC callback functions
*/
+#ifdef LEGACY_FLAC
static FLAC__StreamDecoderReadStatus
flac_read_callback (const FLAC__StreamDecoder *decoder,
FLAC__byte buffer[],
unsigned *bytes,
void *client_data)
+#else
+static FLAC__StreamDecoderReadStatus
+flac_read_callback (const FLAC__StreamDecoder *decoder,
+ FLAC__byte buffer[],
+ size_t *bytes,
+ void *client_data)
+#endif
{
flac_decoder_t *this = (flac_decoder_t *)client_data;
- int number_of_bytes_to_copy;
+ size_t number_of_bytes_to_copy;
- lprintf("flac_read_callback: %d\n", *bytes);
+ lprintf("flac_read_callback: %zd\n", (size_t)*bytes);
if (this->buf_pos > *bytes)
number_of_bytes_to_copy = *bytes;
else
number_of_bytes_to_copy = this->buf_pos;
- lprintf("number_of_bytes_to_copy: %d\n", number_of_bytes_to_copy);
+ lprintf("number_of_bytes_to_copy: %zd\n", number_of_bytes_to_copy);
*bytes = number_of_bytes_to_copy;