[FFmpeg-devel] [PATCH 2/3] ff_put_wav_header: add flag to omit 0 cbSize field

Daniel Verkamp daniel at drv.nu
Wed Mar 19 01:18:27 CET 2014

On Tue, Mar 18, 2014 at 3:44 AM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> On Tue, Mar 18, 2014 at 8:40 AM, Daniel Verkamp <daniel at drv.nu> wrote:
>> For a specific example, see "[FFmpeg-devel] Wave header" thread from
>> last year [1].
>> -flags +bitexact is still needed to produce "normal" WAV files; it may
>> be worth considering whether the INFO tag should be written by
>> default.  Clearly tools that don't properly interpret the headers are
>> broken, but it is probably better to produce files that work rather
>> than files with the mostly-useless-for-WAV encoder information by
>> default.
>> Thanks,
>> -- Daniel
> This seems like an incredibly ugly hack, I would rather not have
> intentionally broken muxing - even more so without an *explicit* flag.
> Triggering it with the std_compliance flag seems even worse.

I agree that it is ugly from a purist point of view, but I think it is
the practical thing to do.

The existing behavior breaks tools, and the files created after the
patch should work with any demuxer - even many WAV files from
Microsoft (the creators of the format) are muxed in this way, so any
decoder that has been tested at all will work.

As far as std_compliance, I am open to suggestions; I added that check
as a way to force pedantically spec-compliant files, but I don't
expect anyone will actually use that except perhaps for tests.

-- Daniel Verkamp

More information about the ffmpeg-devel mailing list