Mercurial > libavcodec.hg
comparison mpegvideo.c @ 9161:3a54ad453dbf libavcodec
Use av_mallocz() to initialize hwaccel_data_private.
author | gb |
---|---|
date | Wed, 11 Mar 2009 08:25:00 +0000 |
parents | 9e66ada64b76 |
children | 7b62de9c383d |
comparison
equal
deleted
inserted
replaced
9160:678152bdb3a1 | 9161:3a54ad453dbf |
---|---|
181 int r; | 181 int r; |
182 | 182 |
183 if (s->avctx->hwaccel) { | 183 if (s->avctx->hwaccel) { |
184 assert(!pic->hwaccel_data_private); | 184 assert(!pic->hwaccel_data_private); |
185 if (s->avctx->hwaccel->priv_data_size) { | 185 if (s->avctx->hwaccel->priv_data_size) { |
186 pic->hwaccel_data_private = av_malloc(s->avctx->hwaccel->priv_data_size); | 186 pic->hwaccel_data_private = av_mallocz(s->avctx->hwaccel->priv_data_size); |
187 if (!pic->hwaccel_data_private) { | 187 if (!pic->hwaccel_data_private) { |
188 av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n"); | 188 av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n"); |
189 return -1; | 189 return -1; |
190 } | 190 } |
191 } | 191 } |