summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2009-03-11 08:25:00 +0000
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2009-03-11 08:25:00 +0000
commitcd823ff950cf81d54965eceedb64569fee79ab36 (patch)
tree41a162a8f75900aa1411df370e6e5cf1c64d39e3 /libavcodec
parent27ad7d3a96e05905cc88495060ab387faab0e719 (diff)
Use av_mallocz() to initialize hwaccel_data_private.
Originally committed as revision 17942 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h6
-rw-r--r--libavcodec/mpegvideo.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8fdc9d1322..10424384ea 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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;
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 9602604b35..703992d45e 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -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;