[FFmpeg-cvslog] j2kenc: Zero DWT struct on allocation

Michael Niedermayer git at videolan.org
Tue May 28 02:55:30 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 28 02:47:25 2013 +0200| [9c66da517f3e967895ec830dd5b89262b48873d1] | committer: Michael Niedermayer

j2kenc: Zero DWT struct on allocation

Should fix fate

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c66da517f3e967895ec830dd5b89262b48873d1
---

 libavcodec/j2kenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index da50856..906ef61 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -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++){



More information about the ffmpeg-cvslog mailing list