summaryrefslogtreecommitdiff
path: root/libavformat/riffenc.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2016-10-12 12:34:48 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2016-10-12 12:34:48 +0200
commitfe8959bbece4d86a1872b813c25c2682dcd5ef42 (patch)
tree29a0885944e31f667686b53866cff36f644ac0f2 /libavformat/riffenc.c
parent230178dfe25ebe27934062c9fa8e2a40e6ad2b0b (diff)
downloadffmpeg-fe8959bbece4d86a1872b813c25c2682dcd5ef42.tar.gz
lavf/riffenc: Always write unexpected channel_mask.
Allows to write arbitrary channel masks also for 16bit 48kHz pcm.
Diffstat (limited to 'libavformat/riffenc.c')
-rw-r--r--libavformat/riffenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
index 4b25c061d9..c96329da48 100644
--- a/libavformat/riffenc.c
+++ b/libavformat/riffenc.c
@@ -71,6 +71,8 @@ int ff_put_wav_header(AVFormatContext *s, AVIOContext *pb,
frame_size = av_get_audio_frame_duration2(par, par->block_align);
waveformatextensible = (par->channels > 2 && par->channel_layout) ||
+ par->channels == 1 && par->channel_layout && par->channel_layout != AV_CH_LAYOUT_MONO ||
+ par->channels == 2 && par->channel_layout && par->channel_layout != AV_CH_LAYOUT_STEREO ||
par->sample_rate > 48000 ||
par->codec_id == AV_CODEC_ID_EAC3 ||
av_get_bits_per_sample(par->codec_id) > 16;