diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2017-05-27 16:07:35 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2017-05-27 17:22:19 +1000 |
commit | bb750734287a4079ca3de9ff85c71cc62160ac46 (patch) | |
tree | 0f66793f371634a4b75a4c8639230dfbfd481257 /src/flac | |
parent | b762a20ace7c7771f87f63478bcee3cf51268cff (diff) | |
download | flac-bb750734287a4079ca3de9ff85c71cc62160ac46.tar.gz |
flac: Use WAVEFORMATEXTENSIBLE when bps != (8|16)
When decoding to WAV, the legacy wFormatTag of WAVE_FORMAT_PCM should
only be used if the bitwidth is 8 or 16. For all other bitwidths,
use WAVEFORMATEXTENSIBLE.
Two of the test programs/scripts also needed updating.
Diffstat (limited to 'src/flac')
-rw-r--r-- | src/flac/decode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flac/decode.c b/src/flac/decode.c index 88bc2799..de7773ec 100644 --- a/src/flac/decode.c +++ b/src/flac/decode.c @@ -582,7 +582,7 @@ FLAC__bool write_iff_headers(FILE *f, DecoderSession *decoder_session, FLAC__uin (format == FORMAT_WAVE || format == FORMAT_WAVE64 || format == FORMAT_RF64) && ( (decoder_session->channel_mask != 0 && decoder_session->channel_mask != 0x0004 && decoder_session->channel_mask != 0x0003) || - decoder_session->bps%8 || + (decoder_session->bps != 8 && decoder_session->bps != 16) || decoder_session->channels > 2 ); const FLAC__uint64 data_size = samples * decoder_session->channels * ((decoder_session->bps+7)/8); |