# HG changeset patch # User reimar # Date 1392562052 0 # Node ID 122de2aa583b88ea37545e19e9f94a33a189738f # Parent b3afe52119c4011d9030f3609426d96cf8988a6c vf_screenshot: use calloc. diff -r b3afe52119c4 -r 122de2aa583b libmpcodecs/vf_screenshot.c --- 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();