Mercurial > libavcodec.hg
changeset 9161:3a54ad453dbf libavcodec
Use av_mallocz() to initialize hwaccel_data_private.
author | gb |
---|---|
date | Wed, 11 Mar 2009 08:25:00 +0000 |
parents | 678152bdb3a1 |
children | 9f96409c5134 |
files | avcodec.h mpegvideo.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/avcodec.h Tue Mar 10 17:38:16 2009 +0000 +++ b/avcodec.h Wed Mar 11 08:25:00 2009 +0000 @@ -2467,9 +2467,9 @@ /** * 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;
--- a/mpegvideo.c Tue Mar 10 17:38:16 2009 +0000 +++ b/mpegvideo.c Wed Mar 11 08:25:00 2009 +0000 @@ -183,7 +183,7 @@ 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;