[FFmpeg-cvslog] fftools/ffmpeg_opt: Fix mixed declarations and code

Andreas Rheinhardt git at videolan.org
Wed Nov 6 21:39:50 EET 2019


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Wed Nov  6 13:18:16 2019 +0100| [fc7b6d55741a926896958939a97b2958df1c1bb4] | committer: Michael Niedermayer

fftools/ffmpeg_opt: Fix mixed declarations and code

Introduced in ed3c317d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc7b6d55741a926896958939a97b2958df1c1bb4
---

 fftools/ffmpeg_opt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index af9a9a6acb..71063cc443 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -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)
 {
     OptionsContext *o = optctx;
+    int ret;
     char *s = av_asprintf("%s:%c", opt + 1, *opt);
     if (!s)
         return AVERROR(ENOMEM);
-    int ret = parse_option(o, s, arg, options);
+    ret = parse_option(o, s, arg, options);
     av_free(s);
     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)
 {
     OptionsContext *o = optctx;
+    int ret;
     char *tcr = av_asprintf("timecode=%s", arg);
     if (!tcr)
         return AVERROR(ENOMEM);
-    int ret = parse_option(o, "metadata:g", tcr, options);
+    ret = parse_option(o, "metadata:g", tcr, options);
     if (ret >= 0)
         ret = av_dict_set(&o->g->codec_opts, "gop_timecode", arg, 0);
     av_free(tcr);



More information about the ffmpeg-cvslog mailing list