mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2025-02-20 02:40:34 +00:00
src/wav.c : Handle four zero bytes as a marker within a LIST or INFO chunk. Thanks to Rogrio Brito for supplying an example file.
This commit is contained in:
parent
b038515b4e
commit
6ab21f7671
@ -5,6 +5,10 @@
|
||||
around problems that might occur if a users TERM settings are incorrect.
|
||||
Thanks to Rob Til Freedmen for helping to debug this.
|
||||
|
||||
* src/wav.c
|
||||
Handle four zero bytes as a marker within a LIST or INFO chunk.
|
||||
Thanks to Rogério Brito for supplying an example file.
|
||||
|
||||
2009-02-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src/*.c
|
||||
|
11
src/wav.c
11
src/wav.c
@ -1380,6 +1380,17 @@ wav_subchunk_parse (SF_PRIVATE *psf, int chunk)
|
||||
bytesread += exif_subchunk_parse (psf, length - bytesread) ;
|
||||
break ;
|
||||
|
||||
case 0 :
|
||||
/*
|
||||
** Four zero bytes where a marker was expected. Assume this means
|
||||
** the rest of the chunk is garbage.
|
||||
*/
|
||||
psf_log_printf (psf, " *** Found weird-ass zero marker. Jumping to end of chunk.\n") ;
|
||||
if (bytesread < length)
|
||||
bytesread += psf_binheader_readf (psf, "j", length - bytesread + 4) ;
|
||||
psf_log_printf (psf, " *** Offset is now : 0x%X\n", psf_fseek (psf, 0, SEEK_CUR)) ;
|
||||
return 0 ;
|
||||
|
||||
default :
|
||||
psf_binheader_readf (psf, "4", &dword) ;
|
||||
bytesread += sizeof (dword) ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user