/**
* 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;
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;