summaryrefslogtreecommitdiff
path: root/src/flac
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2014-12-14 20:00:33 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2014-12-14 20:00:37 +1100
commit775eb934f77e72e91528d857b293b4ec8c9e5be5 (patch)
treea07add1e994f71c0bf6df2fac541eab0d5f221d0 /src/flac
parentbc97640b656b25c3876ca8d5317d4064b0f4f40e (diff)
downloadflac-775eb934f77e72e91528d857b293b4ec8c9e5be5.tar.gz
src/flac/decode.c : Add WAVEFORMATEXTENSIBLE to WAV files as needed.
Patch-by: lvqcl <lvqcl.mail@gmail.com>
Diffstat (limited to 'src/flac')
-rw-r--r--src/flac/decode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/flac/decode.c b/src/flac/decode.c
index b38f77c3..ff6cf336 100644
--- a/src/flac/decode.c
+++ b/src/flac/decode.c
@@ -581,8 +581,7 @@ FLAC__bool write_iff_headers(FILE *f, DecoderSession *decoder_session, FLAC__uin
const FLAC__bool is_waveformatextensible =
(format == FORMAT_WAVE || format == FORMAT_WAVE64 || format == FORMAT_RF64) &&
(
- decoder_session->channel_mask == 2 ||
- decoder_session->channel_mask > 3 ||
+ (decoder_session->channel_mask != 0 && decoder_session->channel_mask != 0x0004 && decoder_session->channel_mask != 0x0003) ||
decoder_session->bps%8 ||
decoder_session->channels > 2
);