src/flac/decode.c : Decode WAVEFORMATEXTENSIBLE_CHANNEL_MASK.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 27 Apr 2014 19:10:12 +0000 (05:10 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 27 Apr 2014 19:10:16 +0000 (05:10 +1000)
When decoding, read the contents of the WAVEFORMATEXTENSIBLE_CHANNEL_MASK
tag and write write the channel mask to the WAV file.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

src/flac/decode.c

index f3b1daf..3f08c21 100644 (file)
@@ -294,7 +294,7 @@ FLAC__bool DecoderSession_init_decoder(DecoderSession *decoder_session, const ch
        FLAC__stream_decoder_set_md5_checking(decoder_session->decoder, true);
        if (0 != decoder_session->cue_specification)
                FLAC__stream_decoder_set_metadata_respond(decoder_session->decoder, FLAC__METADATA_TYPE_CUESHEET);
-       if (decoder_session->replaygain.spec.apply)
+       if (decoder_session->replaygain.spec.apply || !decoder_session->channel_map_none)
                FLAC__stream_decoder_set_metadata_respond(decoder_session->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
 
 #if FLAC__HAS_OGG