[FFmpeg-devel] [PATCH 2/3] lavc: add av_fast_padded_mallocz

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jul 10 08:54:53 CEST 2012



On 10 Jul 2012, at 05:53, Paul B Mahol <onemda at gmail.com> wrote:

> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> libavcodec/avcodec.h |    6 ++++++
> libavcodec/utils.c   |   12 ++++++++++++
> 2 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index c850963..80bd75e 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -4602,6 +4602,12 @@ void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
> void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
> 
> /**
> + * Same behaviour av_fast_padded_malloc except that buffer will always
> + * be 0-initialized after call.

Huh? I don't think that's what it does, it does not always initialize to 0, also I think it misses a check for allocation failure.


More information about the ffmpeg-devel mailing list