mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
replace alloca with ms_malloc0 to avoid stack limitation with big file
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@508 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
386d602b3d
commit
f273cdb2b9
1 changed files with 2 additions and 1 deletions
|
|
@ -1597,7 +1597,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
|
|||
m=ms_load_generate_yuv(reqsize);
|
||||
return m;
|
||||
}
|
||||
jpgbuf=(uint8_t*)alloca(statbuf.st_size);
|
||||
jpgbuf=(uint8_t*)ms_malloc0(statbuf.st_size);
|
||||
if (jpgbuf==NULL)
|
||||
{
|
||||
#if !defined(_MSC_VER)
|
||||
|
|
@ -1615,6 +1615,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
|
|||
_read(fd,jpgbuf,statbuf.st_size);
|
||||
#endif
|
||||
m=jpeg2yuv(jpgbuf,statbuf.st_size,reqsize);
|
||||
ms_free(jpgbuf);
|
||||
}else{
|
||||
m=ms_load_generate_yuv(reqsize);
|
||||
ms_error("Cannot load %s",jpgpath);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue