mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/w64.c : Fix writing of 'riff' chunk length and check for correct value in parser.
This commit is contained in:
parent
d4ef5e4320
commit
a516149c22
@ -1,3 +1,8 @@
|
||||
2007-10-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/w64.c
|
||||
Fix writing of 'riff' chunk length and check for correct value in parser.
|
||||
|
||||
2007-09-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/index.html
|
||||
|
@ -226,7 +226,7 @@ w64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
|
||||
|
||||
bytesread += psf_binheader_readf (psf, "e8", &chunk_size) ;
|
||||
|
||||
if (psf->filelength < chunk_size)
|
||||
if (psf->filelength != chunk_size)
|
||||
psf_log_printf (psf, "riff : %D (should be %D)\n", chunk_size, psf->filelength) ;
|
||||
else
|
||||
psf_log_printf (psf, "riff : %D\n", chunk_size) ;
|
||||
@ -399,7 +399,7 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
|
||||
psf_fseek (psf, 0, SEEK_SET) ;
|
||||
|
||||
/* riff marker, length, wave and 'fmt ' markers. */
|
||||
psf_binheader_writef (psf, "eh8hh", riff_MARKER16, psf->filelength - 8, wave_MARKER16, fmt_MARKER16) ;
|
||||
psf_binheader_writef (psf, "eh8hh", riff_MARKER16, psf->filelength, wave_MARKER16, fmt_MARKER16) ;
|
||||
|
||||
subformat = psf->sf.format & SF_FORMAT_SUBMASK ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user