mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-25 20:19:36 +00:00
libsndfile changes more likely to be excepted back into tree
This commit is contained in:
parent
f4978d614d
commit
259d315372
@ -169,12 +169,11 @@ alac_close (SF_PRIVATE *psf)
|
|||||||
SF_CHUNK_INFO chunk_info ;
|
SF_CHUNK_INFO chunk_info ;
|
||||||
sf_count_t readcount ;
|
sf_count_t readcount ;
|
||||||
uint32_t pakt_size = 0, saved_partial_block_frames ;
|
uint32_t pakt_size = 0, saved_partial_block_frames ;
|
||||||
uint8_t *kuki_data = (uint8_t *)malloc (plac->kuki_size);
|
#ifndef _MSC_VER
|
||||||
|
uint8_t *kuki_data [plac->kuki_size];
|
||||||
if (!kuki_data)
|
#else
|
||||||
{
|
uint8_t *kuki_data = (uint8_t *)_alloca(plac->kuki_size);
|
||||||
return SFE_MALLOC_FAILED ;
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
plac->final_write_block = 1 ;
|
plac->final_write_block = 1 ;
|
||||||
saved_partial_block_frames = plac->partial_block_frames ;
|
saved_partial_block_frames = plac->partial_block_frames ;
|
||||||
@ -428,12 +427,11 @@ static int
|
|||||||
alac_encode_block (SF_PRIVATE * psf, ALAC_PRIVATE *plac)
|
alac_encode_block (SF_PRIVATE * psf, ALAC_PRIVATE *plac)
|
||||||
{ ALAC_ENCODER *penc = &plac->encoder ;
|
{ ALAC_ENCODER *penc = &plac->encoder ;
|
||||||
uint32_t num_bytes = 0 ;
|
uint32_t num_bytes = 0 ;
|
||||||
uint8_t* byte_buffer = (uint8_t*)malloc (psf->sf.channels * ALAC_BYTE_BUFFER_SIZE) ;
|
#ifndef _MSC_VER
|
||||||
|
uint8_t byte_buffer [psf->sf.channels * ALAC_BYTE_BUFFER_SIZE] ;
|
||||||
if (!byte_buffer)
|
#else
|
||||||
{
|
uint8_t* byte_buffer = (uint8_t*)_alloca (psf->sf.channels * ALAC_BYTE_BUFFER_SIZE) ;
|
||||||
return SFE_MALLOC_FAILED ;
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
alac_encode (penc, plac->channels, plac->partial_block_frames, plac->buffer, byte_buffer, &num_bytes) ;
|
alac_encode (penc, plac->channels, plac->partial_block_frames, plac->buffer, byte_buffer, &num_bytes) ;
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#pragma warning (disable : 4244)
|
#pragma warning (disable : 4244)
|
||||||
#pragma warning (disable : 4761)
|
#pragma warning (disable : 4761)
|
||||||
|
|
||||||
|
#include <malloc.h>
|
||||||
|
|
||||||
/* Set to 1 if the compile is GNU GCC. */
|
/* Set to 1 if the compile is GNU GCC. */
|
||||||
/* #undef COMPILER_IS_GCC */
|
/* #undef COMPILER_IS_GCC */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user