summaryrefslogtreecommitdiff
path: root/libavfilter/vsrc_life.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-03-03 12:33:42 +0100
committerNicolas George <nicolas.george@normalesup.org>2012-03-03 12:33:54 +0100
commiteb6b6d7f8a5bfbc8d35324472bce1f6262adfc97 (patch)
treeafdcb05c31ebd0b3a1e577810c7341f7cfa634e2 /libavfilter/vsrc_life.c
parentf8210f892ec5cb3eeb0e267a18ae8531141104b5 (diff)
downloadffmpeg-eb6b6d7f8a5bfbc8d35324472bce1f6262adfc97.tar.gz
vsrc_life: free option values.
Diffstat (limited to 'libavfilter/vsrc_life.c')
-rw-r--r--libavfilter/vsrc_life.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
index ae14401787..d66fc663cc 100644
--- a/libavfilter/vsrc_life.c
+++ b/libavfilter/vsrc_life.c
@@ -177,6 +177,7 @@ static int init_pattern_from_file(AVFilterContext *ctx)
if ((ret = av_file_map(life->filename, &life->file_buf, &life->file_bufsize,
0, ctx)) < 0)
return ret;
+ av_freep(&life->filename);
/* prescan file to get the number of lines and the maximum width */
w = 0;
@@ -243,6 +244,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: %s\n", life->rate);
return AVERROR(EINVAL);
}
+ av_freep(&life->rate);
if (!life->size && !life->filename)
av_opt_set(life, "size", "320x240", 0);
@@ -252,6 +254,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
av_log(ctx, AV_LOG_ERROR, "Invalid frame size: %s\n", life->size);
return ret;
}
+ av_freep(&life->size);
if ((ret = parse_rule(&life->born_rule, &life->stay_rule, life->rule_str, ctx)) < 0)
return ret;
@@ -262,6 +265,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
life->name ## _color_str); \
return ret; \
} \
+ av_freep(&life->name ## _color_str); \
} while (0)
PARSE_COLOR(life);