mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
10l (gcc 2.95 fix)
Originally committed as revision 3827 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
1f3f950799
commit
d5f121e2a5
@ -45,13 +45,13 @@
|
||||
void *av_malloc(unsigned int size)
|
||||
{
|
||||
void *ptr;
|
||||
int diff;
|
||||
|
||||
/* lets disallow possible ambiguous cases */
|
||||
if(size > INT_MAX)
|
||||
return NULL;
|
||||
|
||||
#ifdef MEMALIGN_HACK
|
||||
int diff;
|
||||
ptr = malloc(size+16+1);
|
||||
diff= ((-(int)ptr - 1)&15) + 1;
|
||||
ptr += diff;
|
||||
@ -97,13 +97,13 @@ void *av_malloc(unsigned int size)
|
||||
*/
|
||||
void *av_realloc(void *ptr, unsigned int size)
|
||||
{
|
||||
int diff;
|
||||
/* lets disallow possible ambiguous cases */
|
||||
if(size > INT_MAX)
|
||||
return NULL;
|
||||
|
||||
#ifdef MEMALIGN_HACK
|
||||
//FIXME this isnt aligned correctly though it probably isnt needed
|
||||
int diff;
|
||||
if(!ptr) return av_malloc(size);
|
||||
diff= ((char*)ptr)[-1];
|
||||
return realloc(ptr - diff, size + diff) + diff;
|
||||
|
Loading…
Reference in New Issue
Block a user