j2kenc: Zero DWT struct on allocation
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 28 May 2013 00:47:25 +0000 (02:47 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 28 May 2013 00:47:25 +0000 (02:47 +0200)
Should fix fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/j2kenc.c

index da50856..906ef61 100644 (file)
@@ -350,7 +350,7 @@ static int init_tiles(Jpeg2000EncoderContext *s)
         for (tilex = 0; tilex < s->numXtiles; tilex++, tileno++){
             Jpeg2000Tile *tile = s->tile + tileno;
 
-            tile->comp = av_malloc(s->ncomponents * sizeof(Jpeg2000Component));
+            tile->comp = av_mallocz(s->ncomponents * sizeof(Jpeg2000Component));
             if (!tile->comp)
                 return AVERROR(ENOMEM);
             for (compno = 0; compno < s->ncomponents; compno++){