Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libFLAC/include/private/ogg_encoder_aspect.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void FLAC__ogg_encoder_aspect_set_defaults(FLAC__OggEncoderAspect *aspect);
FLAC__bool FLAC__ogg_encoder_aspect_init(FLAC__OggEncoderAspect *aspect);
void FLAC__ogg_encoder_aspect_finish(FLAC__OggEncoderAspect *aspect);

typedef FLAC__StreamEncoderWriteStatus (*FLAC__OggEncoderAspectWriteCallbackProxy)(const void *encoder, const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame, void *client_data);
typedef FLAC__StreamEncoderWriteStatus (*FLAC__OggEncoderAspectWriteCallbackProxy)(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame, void *client_data);

FLAC__StreamEncoderWriteStatus FLAC__ogg_encoder_aspect_write_callback_wrapper(FLAC__OggEncoderAspect *aspect, const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame, FLAC__bool is_last_block, FLAC__OggEncoderAspectWriteCallbackProxy write_callback, void *encoder, void *client_data);
#endif
3 changes: 2 additions & 1 deletion src/libFLAC/stream_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -4721,13 +4721,14 @@ uint32_t find_best_partition_order_(
uint32_t sum;

for(partition_order = (int)max_partition_order, sum = 0; partition_order >= (int)min_partition_order; partition_order--) {
FLAC__ASSERT(do_escape_coding != /* XOR */ (raw_bits_per_partition == NULL));
if(!
set_partitioned_rice_(
#ifdef EXACT_RICE_BITS_CALCULATION
residual,
#endif
abs_residual_partition_sums+sum,
raw_bits_per_partition+sum,
do_escape_coding ? raw_bits_per_partition+sum : NULL,
residual_samples,
predictor_order,
rice_parameter_limit,
Expand Down
3 changes: 2 additions & 1 deletion src/share/grabbag/cuesheet.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message,
}
else if(0 == FLAC__STRCASECMP(field, "INDEX")) {
FLAC__int64 xx;
FLAC__StreamMetadata_CueSheet_Track *track = &cs->tracks[cs->num_tracks-1];
FLAC__StreamMetadata_CueSheet_Track *track;
if(in_track_num < 0) {
*error_message = "found INDEX before any TRACK";
return false;
Expand All @@ -347,6 +347,7 @@ static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message,
return false;
}
FLAC__ASSERT(cs->num_tracks > 0);
track = &cs->tracks[cs->num_tracks-1];
if(track->num_indices == 0) {
/* it's the first index point of the track */
if(in_index_num > 1) {
Expand Down
6 changes: 3 additions & 3 deletions src/test_streams/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ static FLAC__bool write_little_endian_uint64(FILE *f, FLAC__uint64 x)
static FLAC__bool write_big_endian(FILE *f, FLAC__int32 x, size_t bytes)
{
if(bytes < 4)
x <<= 8*(4-bytes);
x = (uint32_t)x << 8*(4-bytes);
while(bytes) {
if(fputc(x>>24, f) == EOF)
return false;
x <<= 8;
x = (uint32_t)x << 8;
bytes--;
}
return true;
Expand Down Expand Up @@ -1057,7 +1057,7 @@ static FLAC__bool write_simple_wavex_header (FILE * f, unsigned samplerate, unsi
static FLAC__bool generate_noisy_sine(void)
{
FILE *f;
int64_t randstate = 0x1243456;
uint64_t randstate = 0x1243456;
double sample, last_val = 0.0;
int k;
int seconds = 300;
Expand Down
Loading