[FFmpeg-devel] [PATCH] ff_put_wav_header: add flag to force WAVEFORMATEX

Michael Niedermayer michaelni at gmx.at
Wed Apr 30 17:31:56 CEST 2014


On Tue, Apr 29, 2014 at 07:26:05PM -0700, Daniel Verkamp wrote:
> Partially undoes commit 2c4e08d89327595f7f4be57dda4b3775e1198d5e:
> 
>     riff: always generate a proper WAVEFORMATEX structure in
>     ff_put_wav_header
> 
> A new flag, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX, is added to force the
> use of WAVEFORMATEX rather than PCMWAVEFORMAT even for PCM codecs.
> 
> This flag is used in the Matroska muxer (the cause of the original
> change) and in the ASF muxer, because the specifications for
> these formats indicate explicitly that WAVEFORMATEX should be used.
> 
> Muxers for other formats will return to the original behavior of writing
> PCMWAVEFORMAT when writing a header for raw PCM.
> 
> In particular, this causes raw PCM in WAV to generate the canonical
> 44-byte header expected by some tools.
> ---
>  libavformat/asfenc.c                              |  2 +-
>  libavformat/avienc.c                              |  2 +-
>  libavformat/matroskaenc.c                         |  2 +-
>  libavformat/movenc.c                              |  4 +-
>  libavformat/riff.h                                | 16 ++++++-
>  libavformat/riffenc.c                             |  9 ++--
>  libavformat/wavenc.c                              |  4 +-
>  libavformat/wtvenc.c                              |  2 +-
>  tests/fate/filter-audio.mak                       |  2 +-
>  tests/ref/acodec/adpcm-adx                        |  2 +-
>  tests/ref/acodec/adpcm-ima_qt                     |  2 +-
>  tests/ref/acodec/adpcm-ima_wav                    |  2 +-
>  tests/ref/acodec/adpcm-ms                         |  2 +-
>  tests/ref/acodec/adpcm-swf                        |  2 +-
>  tests/ref/acodec/adpcm-yamaha                     |  2 +-
>  tests/ref/acodec/alac                             |  2 +-
>  tests/ref/acodec/flac                             |  2 +-
>  tests/ref/acodec/g723_1                           |  2 +-
>  tests/ref/acodec/mp2                              |  2 +-
>  tests/ref/acodec/mp2fixed                         |  2 +-
>  tests/ref/acodec/pcm-alaw                         |  2 +-
>  tests/ref/acodec/pcm-f32be                        |  2 +-
>  tests/ref/acodec/pcm-f32le                        |  2 +-
>  tests/ref/acodec/pcm-f64be                        |  2 +-
>  tests/ref/acodec/pcm-f64le                        |  2 +-
>  tests/ref/acodec/pcm-mulaw                        |  2 +-
>  tests/ref/acodec/pcm-s16be                        |  2 +-
>  tests/ref/acodec/pcm-s16be_planar                 |  2 +-
>  tests/ref/acodec/pcm-s16le                        |  6 +--
>  tests/ref/acodec/pcm-s16le_planar                 |  2 +-
>  tests/ref/acodec/pcm-s24be                        |  2 +-
>  tests/ref/acodec/pcm-s24le                        |  2 +-
>  tests/ref/acodec/pcm-s24le_planar                 |  2 +-
>  tests/ref/acodec/pcm-s32be                        |  2 +-
>  tests/ref/acodec/pcm-s32le                        |  2 +-
>  tests/ref/acodec/pcm-s32le_planar                 |  2 +-
>  tests/ref/acodec/pcm-s8                           |  2 +-
>  tests/ref/acodec/pcm-s8_planar                    |  2 +-
>  tests/ref/acodec/pcm-u16be                        |  2 +-
>  tests/ref/acodec/pcm-u16le                        |  2 +-
>  tests/ref/acodec/pcm-u24be                        |  2 +-
>  tests/ref/acodec/pcm-u24le                        |  2 +-
>  tests/ref/acodec/pcm-u32be                        |  2 +-
>  tests/ref/acodec/pcm-u32le                        |  2 +-
>  tests/ref/acodec/pcm-u8                           |  6 +--
>  tests/ref/acodec/roqaudio                         |  2 +-
>  tests/ref/fate/mapchan-6ch-extract-2              |  4 +-
>  tests/ref/fate/mapchan-6ch-extract-2-downmix-mono |  2 +-
>  tests/ref/fate/mapchan-silent-mono                |  2 +-
>  tests/ref/lavf/w64                                |  4 +-
>  tests/ref/lavf/wav                                |  4 +-
>  tests/ref/seek/acodec-pcm-s16le                   | 54 +++++++++++------------
>  tests/ref/seek/acodec-pcm-u8                      | 54 +++++++++++------------
>  tests/ref/seek/lavf-wav                           | 30 ++++++-------
>  54 files changed, 148 insertions(+), 131 deletions(-)

patch applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140430/2553c9ac/attachment.asc>


More information about the ffmpeg-devel mailing list