Mercurial > libavformat.hg
comparison riff.c @ 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 | e81fb2bec962 |
comparison
equal
deleted
inserted
replaced
5470:3f4dbd1e6548 | 5471:b5af21b34101 |
---|---|
320 uint8_t *riff_extradata= temp; | 320 uint8_t *riff_extradata= temp; |
321 uint8_t *riff_extradata_start= temp; | 321 uint8_t *riff_extradata_start= temp; |
322 | 322 |
323 if(!enc->codec_tag || enc->codec_tag > 0xffff) | 323 if(!enc->codec_tag || enc->codec_tag > 0xffff) |
324 return -1; | 324 return -1; |
325 waveformatextensible = enc->channels > 2 && enc->channel_layout; | 325 waveformatextensible = (enc->channels > 2 && enc->channel_layout) |
326 || enc->sample_rate > 48000 | |
327 || av_get_bits_per_sample(enc->codec_id) > 16; | |
326 | 328 |
327 if (waveformatextensible) { | 329 if (waveformatextensible) { |
328 put_le16(pb, 0xfffe); | 330 put_le16(pb, 0xfffe); |
329 } else { | 331 } else { |
330 put_le16(pb, enc->codec_tag); | 332 put_le16(pb, enc->codec_tag); |