diff options
author | Tobias Rapp <t.rapp@noa-audio.com> | 2015-09-10 14:04:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-12 14:39:28 +0200 |
commit | 141637002767d47154bffaf1463edcfd9445a5ee (patch) | |
tree | fb8e639407e7b74e19ed91c80cb278f3b4a9d02e /libavformat/riffenc.c | |
parent | 1e75bee3d6031b39a11c69719fdd24871c109f9d (diff) | |
download | ffmpeg-141637002767d47154bffaf1463edcfd9445a5ee.tar.gz |
avformat/avienc: add muxer option "write_channel_mask"
Allow writing an empty channel mask into the wave format header. Useful
if the input file contains an unknown channel layout.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/riffenc.c')
-rw-r--r-- | libavformat/riffenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index 85c953f2ef..ceb27f272c 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -168,8 +168,9 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc, int flags) } /* write WAVEFORMATEXTENSIBLE extensions */ if (waveformatextensible) { - int write_channel_mask = enc->strict_std_compliance < FF_COMPLIANCE_NORMAL || - enc->channel_layout < 0x40000; + int write_channel_mask = !(flags & FF_PUT_WAV_HEADER_SKIP_CHANNELMASK) && + (enc->strict_std_compliance < FF_COMPLIANCE_NORMAL || + enc->channel_layout < 0x40000); /* 22 is WAVEFORMATEXTENSIBLE size */ avio_wl16(pb, riff_extradata - riff_extradata_start + 22); /* ValidBitsPerSample || SamplesPerBlock || Reserved */ |