Commit e3127db4 authored by Clément Bœsch's avatar Clément Bœsch

ffmpeg: use av_asprintf() in opt_old2new() and fix a memleak.

parent 2a81e0c2
......@@ -4866,9 +4866,9 @@ static int opt_passlogfile(const char *opt, const char *arg)
static int opt_old2new(OptionsContext *o, const char *opt, const char *arg)
{
char *s= av_malloc(strlen(opt)+2);
snprintf(s, strlen(opt)+2, "%s:%c", opt+1, *opt);
return parse_option(o, s, arg, options);
char *s = av_asprintf("%s:%c", opt + 1, *opt);
parse_option(o, s, arg, options);
av_free(s);
}
static int opt_bitrate(OptionsContext *o, const char *opt, const char *arg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment