summaryrefslogtreecommitdiff
path: root/libavfilter/vsrc_testsrc.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-03-03 12:16:55 +0100
committerNicolas George <nicolas.george@normalesup.org>2012-03-03 13:17:39 +0100
commit07fb7682d193c5792ec32f1e7574f28249f6e261 (patch)
treed9653147f57618f4c2c13ebe516df79bdade07f0 /libavfilter/vsrc_testsrc.c
parenteb6b6d7f8a5bfbc8d35324472bce1f6262adfc97 (diff)
vsrc_testsrc: free option values.
Diffstat (limited to 'libavfilter/vsrc_testsrc.c')
-rw-r--r--libavfilter/vsrc_testsrc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 0839a2b88e..4ba0b52525 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -88,17 +88,20 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
av_log(ctx, AV_LOG_ERROR, "Invalid frame size: '%s'\n", test->size);
return ret;
}
+ av_freep(&test->size);
if ((ret = av_parse_video_rate(&frame_rate_q, test->rate)) < 0 ||
frame_rate_q.den <= 0 || frame_rate_q.num <= 0) {
av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: '%s'\n", test->rate);
return ret;
}
+ av_freep(&test->rate);
if ((test->duration) && (ret = av_parse_time(&duration, test->duration, 1)) < 0) {
av_log(ctx, AV_LOG_ERROR, "Invalid duration: '%s'\n", test->duration);
return ret;
}
+ av_freep(&test->duration);
if (test->nb_decimals && strcmp(ctx->filter->name, "testsrc")) {
av_log(ctx, AV_LOG_WARNING,