Mercurial > mplayer.hg
changeset 36754:122de2aa583b
vf_screenshot: use calloc.
author | reimar |
---|---|
date | Sun, 16 Feb 2014 14:47:32 +0000 |
parents | b3afe52119c4 |
children | 1644cfb31b2f |
files | libmpcodecs/vf_screenshot.c |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_screenshot.c Sun Feb 16 14:47:32 2014 +0000 +++ b/libmpcodecs/vf_screenshot.c Sun Feb 16 14:47:32 2014 +0000 @@ -289,14 +289,9 @@ vf->draw_slice=draw_slice; vf->get_image=get_image; vf->uninit=uninit; - vf->priv=malloc(sizeof(struct vf_priv_s)); + vf->priv = calloc(1, sizeof(struct vf_priv_s)); vf->priv->pic = av_frame_alloc(); vf->priv->prefix = strdup(args ? args : "shot"); - vf->priv->frameno=0; - vf->priv->shot=0; - vf->priv->store_slices=0; - vf->priv->outbuffer=0; - vf->priv->ctx=0; vf->priv->avctx = avcodec_alloc_context3(NULL); vf->priv->avctx->pix_fmt = PIX_FMT_RGB24; avcodec_register_all();