mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2025-02-17 01:20:02 +00:00
Fix a couple of signed/unsigned problems.
This commit is contained in:
parent
d1da6dbaaa
commit
25e21e1306
@ -1,10 +1,15 @@
|
||||
2006-05-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/caf.c examples/sndfile-info.c
|
||||
Fix a couple of signed/unsigned problems.
|
||||
|
||||
2006-05-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/command_test.c
|
||||
Add channel map tests.
|
||||
|
||||
* src/common.h src/sndfile.c
|
||||
Add a pointer the the SF_PRIVATE struct and make sure it gets freed when in
|
||||
Add a pointer the the SF_PRIVATE struct and make sure it gets freed in
|
||||
sf_close().
|
||||
|
||||
2006-04-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
@ -332,13 +332,13 @@ broadcast_dump (const char *filename)
|
||||
return ;
|
||||
} ;
|
||||
|
||||
printf ("Description : %.*s\n", sizeof (bext.description), bext.description) ;
|
||||
printf ("Originator : %.*s\n", sizeof (bext.originator), bext.originator) ;
|
||||
printf ("Origination ref : %.*s\n", sizeof (bext.originator_reference), bext.originator_reference) ;
|
||||
printf ("Origination date : %.*s\n", sizeof (bext.origination_date), bext.origination_date) ;
|
||||
printf ("Origination time : %.*s\n", sizeof (bext.origination_time), bext.origination_time) ;
|
||||
printf ("Description : %.*s\n", (int) sizeof (bext.description), bext.description) ;
|
||||
printf ("Originator : %.*s\n", (int) sizeof (bext.originator), bext.originator) ;
|
||||
printf ("Origination ref : %.*s\n", (int) sizeof (bext.originator_reference), bext.originator_reference) ;
|
||||
printf ("Origination date : %.*s\n", (int) sizeof (bext.origination_date), bext.origination_date) ;
|
||||
printf ("Origination time : %.*s\n", (int) sizeof (bext.origination_time), bext.origination_time) ;
|
||||
printf ("BWF version : %d\n", bext.version) ;
|
||||
printf ("UMID : %.*s\n", sizeof (bext.umid), bext.umid) ;
|
||||
printf ("UMID : %.*s\n", (int) sizeof (bext.umid), bext.umid) ;
|
||||
printf ("Coding history : %.*s\n", bext.coding_history_size, bext.coding_history) ;
|
||||
|
||||
} /* broadcast_dump */
|
||||
|
@ -62,7 +62,7 @@
|
||||
#define MAC3_MARKER MAKE_MARKER ('M', 'A', 'C', '3')
|
||||
#define MAC6_MARKER MAKE_MARKER ('M', 'A', 'C', '6')
|
||||
|
||||
#define CAF_PEAK_CHUNK_SIZE(ch) (sizeof (int) + ch * (sizeof (float) + 8))
|
||||
#define CAF_PEAK_CHUNK_SIZE(ch) ((int) (sizeof (int) + ch * (sizeof (float) + 8)))
|
||||
|
||||
#define SFE_CAF_NOT_CAF 666
|
||||
#define SFE_CAF_NO_DESC 667
|
||||
@ -269,7 +269,7 @@ caf_read_header (SF_PRIVATE *psf)
|
||||
if (marker != desc_MARKER)
|
||||
return SFE_CAF_NO_DESC ;
|
||||
|
||||
if (chunk_size < sizeof (DESC_CHUNK))
|
||||
if (chunk_size < SIGNED_SIZEOF (DESC_CHUNK))
|
||||
{ psf_log_printf (psf, "**** Chunk size too small. Should be > 32 bytes.\n") ;
|
||||
return SFE_MALFORMED_FILE ;
|
||||
} ;
|
||||
@ -282,7 +282,7 @@ caf_read_header (SF_PRIVATE *psf)
|
||||
" Frames / packet : %u\n Channels / frame : %u\n Bits / channel : %u\n",
|
||||
desc.fmt_id, desc.fmt_flags, desc.pkt_bytes, desc.pkt_frames, desc.channels_per_frame, desc.bits_per_chan) ;
|
||||
|
||||
if (chunk_size > sizeof (DESC_CHUNK))
|
||||
if (chunk_size > SIGNED_SIZEOF (DESC_CHUNK))
|
||||
psf_binheader_readf (psf, "j", (int) (chunk_size - sizeof (DESC_CHUNK))) ;
|
||||
|
||||
psf->sf.channels = desc.channels_per_frame ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user