Mercurial > libavformat.hg
changeset 5471:b5af21b34101 libavformat
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).
author | michael |
---|---|
date | Fri, 18 Dec 2009 06:03:12 +0000 |
parents | 3f4dbd1e6548 |
children | a24f34fa4186 |
files | riff.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/riff.c Thu Dec 17 18:56:56 2009 +0000 +++ b/riff.c Fri Dec 18 06:03:12 2009 +0000 @@ -322,7 +322,9 @@ 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);