diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-12-18 06:03:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-12-18 06:03:12 +0000 |
commit | 2c2a167ca700d2e0b6c8121f0b6165ed00129526 (patch) | |
tree | 4dbec2c2b7b055c379c87545911eb6fb68c3703f /libavformat/riff.c | |
parent | 4aaab0a328b671f91a6cd195ef98f0d5592c5e4a (diff) | |
download | ffmpeg-2c2a167ca700d2e0b6c8121f0b6165ed00129526.tar.gz |
It appears that waveformatextensible is mandatory for more cases than
just channels>2. The 16bit case is from MSDN, the 48khz is from less a reliable
www page (sorry i cant find the URL anymore).
Originally committed as revision 20892 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r-- | libavformat/riff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c index 8dfc7d3f39..ca8d7da6bd 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -322,7 +322,9 @@ int ff_put_wav_header(ByteIOContext *pb, AVCodecContext *enc) if(!enc->codec_tag || enc->codec_tag > 0xffff) return -1; - waveformatextensible = enc->channels > 2 && enc->channel_layout; + waveformatextensible = (enc->channels > 2 && enc->channel_layout) + || enc->sample_rate > 48000 + || av_get_bits_per_sample(enc->codec_id) > 16; if (waveformatextensible) { put_le16(pb, 0xfffe); |