mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/utils: don't use ff_fast_mallocz() in av_fast_padded_malloc()
It will be removed in the next commit. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
7a879cce37
commit
e44cb7363f
|
@ -29,7 +29,7 @@
|
||||||
#include "libavutil/avassert.h"
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "libavutil/mem_internal.h"
|
#include "libavutil/mem.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
#include "libavutil/imgutils.h"
|
#include "libavutil/imgutils.h"
|
||||||
#include "libavutil/pixfmt.h"
|
#include "libavutil/pixfmt.h"
|
||||||
|
@ -55,7 +55,8 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
|
||||||
*size = 0;
|
*size = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!ff_fast_malloc(p, size, min_size + AV_INPUT_BUFFER_PADDING_SIZE, 1))
|
av_fast_mallocz(p, size, min_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
if (*p)
|
||||||
memset(*p + min_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
memset(*p + min_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +68,8 @@ void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size)
|
||||||
*size = 0;
|
*size = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!ff_fast_malloc(p, size, min_size + AV_INPUT_BUFFER_PADDING_SIZE, 1))
|
av_fast_malloc(p, size, min_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
if (*p)
|
||||||
memset(*p, 0, min_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
memset(*p, 0, min_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue