[FFmpeg-cvslog] r17942 - in trunk/libavcodec: avcodec.h mpegvideo.c

gb subversion
Wed Mar 11 09:25:00 CET 2009


Author: gb
Date: Wed Mar 11 09:25:00 2009
New Revision: 17942

Log:
Use av_mallocz() to initialize hwaccel_data_private.

Modified:
   trunk/libavcodec/avcodec.h
   trunk/libavcodec/mpegvideo.c

Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h	Wed Mar 11 09:14:19 2009	(r17941)
+++ trunk/libavcodec/avcodec.h	Wed Mar 11 09:25:00 2009	(r17942)
@@ -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;

Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c	Wed Mar 11 09:14:19 2009	(r17941)
+++ trunk/libavcodec/mpegvideo.c	Wed Mar 11 09:25:00 2009	(r17942)
@@ -183,7 +183,7 @@ static int alloc_frame_buffer(MpegEncCon
     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;




More information about the ffmpeg-cvslog mailing list