]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Use av_mallocz() to initialize hwaccel_data_private.
authorgb <gb@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 11 Mar 2009 08:25:00 +0000 (08:25 +0000)
committergb <gb@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 11 Mar 2009 08:25:00 +0000 (08:25 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17942 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/avcodec.h
libavcodec/mpegvideo.c

index 8fdc9d1322c38dd63c74218fc00e3d5260f4ddb3..10424384eae0590d3d49969d1292eaecb27db020 100644 (file)
@@ -2467,9 +2467,9 @@ typedef struct AVHWAccel {
     /**
      * Size of HW accelerator private data.
      *
-     * Private data is allocated with av_malloc() before
-     * AVCodecContext::get_buffer() and deallocated after
-     * AVCodecContext::release_buffer().
+     * Private data is allocated with av_mallocz() before
+     * AVCodecContext.get_buffer() and deallocated after
+     * AVCodecContext.release_buffer().
      */
     int priv_data_size;
 } AVHWAccel;
index 9602604b35ad0626d522e3ad66c5c676f789eec7..703992d45e7ead136de66a81c3486a6eab376724 100644 (file)
@@ -183,7 +183,7 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
     if (s->avctx->hwaccel) {
         assert(!pic->hwaccel_data_private);
         if (s->avctx->hwaccel->priv_data_size) {
-            pic->hwaccel_data_private = av_malloc(s->avctx->hwaccel->priv_data_size);
+            pic->hwaccel_data_private = av_mallocz(s->avctx->hwaccel->priv_data_size);
             if (!pic->hwaccel_data_private) {
                 av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n");
                 return -1;