[FFmpeg-cvslog] postproc/postprocess: use av_mallocz()
Michael Niedermayer
git at videolan.org
Sun Feb 22 03:17:31 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Feb 22 03:09:47 2015 +0100| [45e0aa46ca9b8692487efb51274c4de004c22821] | committer: Michael Niedermayer
postproc/postprocess: use av_mallocz()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45e0aa46ca9b8692487efb51274c4de004c22821
---
libpostproc/postprocess.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index c11debc..b8492ee 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -913,11 +913,10 @@ static const char * context_to_name(void * ptr) {
static const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL };
pp_context *pp_get_context(int width, int height, int cpuCaps){
- PPContext *c= av_malloc(sizeof(PPContext));
+ PPContext *c= av_mallocz(sizeof(PPContext));
int stride= FFALIGN(width, 16); //assumed / will realloc if needed
int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed
- memset(c, 0, sizeof(PPContext));
c->av_class = &av_codec_context_class;
if(cpuCaps&PP_FORMAT){
c->hChromaSubSample= cpuCaps&0x3;
More information about the ffmpeg-cvslog
mailing list