mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
fix bug where output resolution was being determined before it was read from the FLAC file
This commit is contained in:
@@ -143,11 +143,7 @@ int play(char *fn)
|
||||
int maxlatency;
|
||||
int thread_id;
|
||||
HANDLE input_file = INVALID_HANDLE_VALUE;
|
||||
#ifdef FLAC__DO_DITHER
|
||||
const unsigned output_bits_per_sample = min(file_info_.bits_per_sample, 16);
|
||||
#else
|
||||
const unsigned output_bits_per_sample = file_info_.bits_per_sample;
|
||||
#endif
|
||||
unsigned output_bits_per_sample;
|
||||
|
||||
if(0 == decoder_) {
|
||||
return 1;
|
||||
@@ -163,6 +159,12 @@ int play(char *fn)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef FLAC__DO_DITHER
|
||||
output_bits_per_sample = min(file_info_.bits_per_sample, 16);
|
||||
#else
|
||||
output_bits_per_sample = file_info_.bits_per_sample;
|
||||
#endif
|
||||
|
||||
strcpy(lastfn_, fn);
|
||||
paused_ = 0;
|
||||
decode_pos_ms_ = 0;
|
||||
|
||||
Reference in New Issue
Block a user