[FFmpeg-trac] #1843(avformat:new): wav file fmt block size could be 16 for formatid==pcm

FFmpeg trac at avcodec.org
Wed Oct 24 14:49:01 CEST 2012


#1843: wav file fmt block size could be 16 for formatid==pcm
------------------------------------+--------------------------------------
             Reporter:  cgo         |                     Type:  defect
               Status:  new         |                 Priority:  minor
            Component:  avformat    |                  Version:  git-master
             Keywords:  wav format  |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+--------------------------------------
 Summary of the bug:
 ffmpeg produces wav files with a 18 bytes size fmt section (hardcoded in
 libavformat/riff.c:ff_put_wav_header()). Some software expect the header
 size to be 16 bytes if wFormatTag is 1 (pcm), as the standard suggests
 that.
 The header size could be 16 for the casual pcm streams, skipping the two
 optional fields at the end of the fmt section.
 This can enhance support for legacy and poorly-written software.

 How to reproduce:
 {{{
 % ffmpeg -i in.wav out.wav
 % hexdump out.wav | head -2
 0000000 4952 4646 0344 0000 4157 4556 6d66 2074
 0000010 0012 0000 0001 0001 1f40 0000 3e80 0000
           ^^__ there !
 ffmpeg version 1.0 and git master.
 built on archlinux
 }}}

 Thank you

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1843>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list