vf_pixdesctest: make config_props work properly when called multiple times.
authorAnton Khirnov <anton@khirnov.net>
Mon, 18 Mar 2013 20:31:54 +0000 (21:31 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 17 May 2013 05:44:23 +0000 (07:44 +0200)
libavfilter/vf_pixdesctest.c

index 5407ec6989c4f841406becdd0eaffc07d024ea9e..cbb869c5664ba9c2c63fc359a5f6ad3131682f9b 100644 (file)
@@ -46,6 +46,7 @@ static int config_props(AVFilterLink *inlink)
 
     priv->pix_desc = av_pix_fmt_desc_get(inlink->format);
 
 
     priv->pix_desc = av_pix_fmt_desc_get(inlink->format);
 
+    av_freep(&priv->line);
     if (!(priv->line = av_malloc(sizeof(*priv->line) * inlink->w)))
         return AVERROR(ENOMEM);
 
     if (!(priv->line = av_malloc(sizeof(*priv->line) * inlink->w)))
         return AVERROR(ENOMEM);