mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
change "bytes" parameter of all read callbacks from "unsigned" to "size_t"
This commit is contained in:
@@ -52,7 +52,7 @@ struct FLAC__BitBuffer {
|
||||
};
|
||||
|
||||
|
||||
static FLAC__bool dummy_read_callback(FLAC__byte buffer[], unsigned *bytes, void *client_data)
|
||||
static FLAC__bool dummy_read_callback(FLAC__byte buffer[], size_t *bytes, void *client_data)
|
||||
{
|
||||
(void)buffer, (void)bytes, (void)client_data;
|
||||
return true;
|
||||
|
||||
@@ -120,10 +120,10 @@ static FLAC__bool generate_file_(FLAC__bool is_ogg)
|
||||
return true;
|
||||
}
|
||||
|
||||
static FLAC__StreamDecoderReadStatus stream_decoder_read_callback_(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
|
||||
static FLAC__StreamDecoderReadStatus stream_decoder_read_callback_(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
|
||||
{
|
||||
StreamDecoderClientData *dcd = (StreamDecoderClientData*)client_data;
|
||||
const unsigned requested_bytes = *bytes;
|
||||
const size_t requested_bytes = *bytes;
|
||||
|
||||
(void)decoder;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ static void free_metadata_blocks_()
|
||||
mutils__free_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_);
|
||||
}
|
||||
|
||||
static FLAC__StreamEncoderReadStatus stream_encoder_read_callback_(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
|
||||
static FLAC__StreamEncoderReadStatus stream_encoder_read_callback_(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
|
||||
{
|
||||
(void)encoder, (void)buffer, (void)bytes, (void)client_data;
|
||||
memset(buffer, 0, *bytes); /* init buffer to avoid valgrind errors */
|
||||
|
||||
Reference in New Issue
Block a user