mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-20 06:20:40 +00:00
ffmpeg: use av_asprintf() in opt_old2new() and fix a memleak.
This commit is contained in:
parent
2a81e0c2ad
commit
e3127db438
6
ffmpeg.c
6
ffmpeg.c
@ -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)
|
static int opt_old2new(OptionsContext *o, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
char *s= av_malloc(strlen(opt)+2);
|
char *s = av_asprintf("%s:%c", opt + 1, *opt);
|
||||||
snprintf(s, strlen(opt)+2, "%s:%c", opt+1, *opt);
|
parse_option(o, s, arg, options);
|
||||||
return parse_option(o, s, arg, options);
|
av_free(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int opt_bitrate(OptionsContext *o, const char *opt, const char *arg)
|
static int opt_bitrate(OptionsContext *o, const char *opt, const char *arg)
|
||||||
|
Loading…
Reference in New Issue
Block a user