[FFmpeg-cvslog] r20892 - in trunk: libavformat/riff.c tests/rotozoom.regression.ref tests/vsynth.regression.ref
Justin Ruggles
justin.ruggles
Sat Dec 19 00:33:29 CET 2009
michael wrote:
> Author: michael
> Date: Fri Dec 18 07:03:12 2009
> New Revision: 20892
>
> Log:
> 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).
>
> Modified:
> trunk/libavformat/riff.c
> trunk/tests/rotozoom.regression.ref
> trunk/tests/vsynth.regression.ref
>
> Modified: trunk/libavformat/riff.c
> ==============================================================================
> --- trunk/libavformat/riff.c Thu Dec 17 19:56:56 2009 (r20891)
> +++ trunk/libavformat/riff.c Fri Dec 18 07:03:12 2009 (r20892)
> @@ -322,7 +322,9 @@ int ff_put_wav_header(ByteIOContext *pb,
>
> 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);
What about the cases where we want to write the waveformatextensible
with 1 or 2 channels? For example, AC-3 supports mono+lfe. It might
also be useful for working with multiple channel-separated sources.
What about writing it for 1-channel and 2-channel files when
channel_layout is set and is not CH_LAYOUT_MONO or CH_LAYOUT_STEREO?
-Justin
More information about the ffmpeg-cvslog
mailing list