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

FFmpeg trac at avcodec.org
Sat Oct 27 21:30:25 CEST 2012


#1843: wav file fmt block size could be 16 for formatid==pcm
------------------------------------+------------------------------------
             Reporter:  cgo         |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  minor       |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  wav         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by cgo):

 Replying to [comment:7 cehoyos]:
 > The original patch should allow to write PCMWAVEFORMAT headers though.

 Right. I reread the wavinfo source code and it really makes wild guesses
 on how the file is structured:

 {{{
 externals/ext13/wavinfo.c :
 typedef struct _wave
 {
     char  w_fileid[4];              /* chunk id 'RIFF'            */
     uint32 w_chunksize;             /* chunk size                 */
     char  w_waveid[4];              /* wave chunk id 'WAVE'       */
     char  w_fmtid[4];               /* format chunk id 'fmt '     */
     uint32 w_fmtchunksize;          /* format chunk size          */
     uint16  w_fmttag;               /* format tag, 1 for PCM      */
     uint16  w_nchannels;            /* number of channels         */
     uint32 w_samplespersec;         /* sample rate in hz          */
     uint32 w_navgbytespersec;       /* average bytes per second   */
     uint16  w_nblockalign;          /* number of bytes per sample */
     uint16  w_nbitspersample;       /* number of bits in a sample */
     char  w_datachunkid[4];         /* data chunk id 'data'       */
     uint32 w_datachunksize;         /* length of data chunk       */
 } t_wave;

 wavinfo = getbytes(sizeof(t_wave));
 }}}

 So any LIST chunk or extended wav format will fail. I think you can merge
 your patch (it's useful anyway), and close the bug. The problem really
 lies with this pure-data object.

 Thanks for your help and this great software,
 Charles

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


More information about the FFmpeg-trac mailing list