mirror of https://git.ffmpeg.org/ffmpeg.git
fftools/ffmpeg_opt: Fix mixed declarations and code
Introduced in ed3c317d
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
84c27c8c08
commit
fc7b6d5574
|
@ -3007,10 +3007,11 @@ static int opt_preset(void *optctx, const char *opt, const char *arg)
|
||||||
static int opt_old2new(void *optctx, const char *opt, const char *arg)
|
static int opt_old2new(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
OptionsContext *o = optctx;
|
OptionsContext *o = optctx;
|
||||||
|
int ret;
|
||||||
char *s = av_asprintf("%s:%c", opt + 1, *opt);
|
char *s = av_asprintf("%s:%c", opt + 1, *opt);
|
||||||
if (!s)
|
if (!s)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
int ret = parse_option(o, s, arg, options);
|
ret = parse_option(o, s, arg, options);
|
||||||
av_free(s);
|
av_free(s);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -3087,10 +3088,11 @@ static int opt_vsync(void *optctx, const char *opt, const char *arg)
|
||||||
static int opt_timecode(void *optctx, const char *opt, const char *arg)
|
static int opt_timecode(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
OptionsContext *o = optctx;
|
OptionsContext *o = optctx;
|
||||||
|
int ret;
|
||||||
char *tcr = av_asprintf("timecode=%s", arg);
|
char *tcr = av_asprintf("timecode=%s", arg);
|
||||||
if (!tcr)
|
if (!tcr)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
int ret = parse_option(o, "metadata:g", tcr, options);
|
ret = parse_option(o, "metadata:g", tcr, options);
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
ret = av_dict_set(&o->g->codec_opts, "gop_timecode", arg, 0);
|
ret = av_dict_set(&o->g->codec_opts, "gop_timecode", arg, 0);
|
||||||
av_free(tcr);
|
av_free(tcr);
|
||||||
|
|
Loading…
Reference in New Issue