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

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Wed Nov 6 14:18:16 EET 2019


Introduced in ed3c317d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 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..f4ccf3f65e 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -3008,9 +3008,10 @@ static int opt_old2new(void *optctx, const char *opt, const char *arg)
 {
     OptionsContext *o = optctx;
     char *s = av_asprintf("%s:%c", opt + 1, *opt);
+    int ret;
     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;
 }
@@ -3088,9 +3089,10 @@ static int opt_timecode(void *optctx, const char *opt, const char *arg)
 {
     OptionsContext *o = optctx;
     char *tcr = av_asprintf("timecode=%s", arg);
+    int ret;
     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);
-- 
2.20.1



More information about the ffmpeg-devel mailing list