From patchwork Wed Nov 6 12:18:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 16143 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id E61C5449478 for ; Wed, 6 Nov 2019 14:18:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BFEE968B0B8; Wed, 6 Nov 2019 14:18:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E298E68A4F6 for ; Wed, 6 Nov 2019 14:18:26 +0200 (EET) Received: by mail-wm1-f67.google.com with SMTP id 11so3146222wmk.0 for ; Wed, 06 Nov 2019 04:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bYVN1b+SUQBNz8rwdduzkFYqCsH5o4MTAPppYeY7BKo=; b=rV8EdQjiRGq99AdMgYCundz2UC0EBIhYEEhVNFF28QlpaItWjV+eh/sgEunL2bDxlA MxtkPGk7n3NtYXayPFLMLpMlJvO/x4tEDNKEnmFgVqSxsPZwqeoYlp29mgBc5eSQ43zz pbO1PKfJVJI1OnuQ5aXXhWnKuwSXPmU5irF90n0Km3aqMbbwGTO0QMUG4GZH68az2UdM Hh2TYvK6gZtveSpcnfydPsCEFjxhgnHvgMCHyal1X1rlVvN/65NXe/1Fg5FMA8cBC6FL 0xcUS6BAK7msl2TPSaCaeCA4i4z9iKR3vXdh75T/EbasgYanpCADMlEDFiNGQfzDrukH gV1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bYVN1b+SUQBNz8rwdduzkFYqCsH5o4MTAPppYeY7BKo=; b=onE+MIA0HLPZJJNESCJlqmN/v6Ufe3eSu+4dyfd0y1X/wJDPifLAhGd6m0Lr27L5/p jM1IeuCYIduRxZTebx0Gd2v/ua9l+227a6EuhizkdzFqeCyn1AuJwI8pXf4Rux36maF3 V3igxNssx2NPGuChGiW+6/1o9Wjo1J2F7nXA6BF5oIn8xd7sP4fdTnpBqVAy3WsM/R69 lPc1krfPZ/asYJ1NmNz/4Zhme6zKrJMThxMotLcCRSmTRg1/6LZZGen5+SeqQ81rrL7O /B+mFsbDn5VvgRovW4rg/KOs5z3MtRpF86uw4zKRQGGA4lzMreRaTzErCjoqxHBuPFks ZyuA== X-Gm-Message-State: APjAAAV47TrXKfbCVHxg21FmSgbACC3lGcSlPrfxnUh+36cV3/9TJdDo MpLWMd/WVwfIuH2AZ/rPR9I9D0Qf X-Google-Smtp-Source: APXvYqxyaHy7rAHohJo87eGsCdsWAy3vq99wDHsGZaS494AHuEVhdMQHo5BTUk+2g64TC/xNlLm0gQ== X-Received: by 2002:a05:600c:2046:: with SMTP id p6mr2310368wmg.165.1573042706232; Wed, 06 Nov 2019 04:18:26 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc08937.dynamic.kabel-deutschland.de. [188.192.137.55]) by smtp.gmail.com with ESMTPSA id x205sm3576393wmb.5.2019.11.06.04.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 04:18:25 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 6 Nov 2019 13:18:16 +0100 Message-Id: <20191106121816.23802-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg_opt: Fix mixed declarations and code X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Introduced in ed3c317d. Signed-off-by: Andreas Rheinhardt --- 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);