From patchwork Fri May 21 09:17:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 27877 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp343322iof; Fri, 21 May 2021 02:24:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVMfJSIdWhpRuBU5QuG7Yy2P5VBQx0HCDV+ykWgZ15tN60HZjB3/krOAOTlym8MXhrNAah X-Received: by 2002:a05:6402:17d9:: with SMTP id s25mr10047154edy.337.1621589055469; Fri, 21 May 2021 02:24:15 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w7si4596484edq.358.2021.05.21.02.24.15; Fri, 21 May 2021 02:24:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=NJffpnPM; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EF21168A0D5; Fri, 21 May 2021 12:19:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074012.outbound.protection.outlook.com [40.92.74.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D3C44689F38 for ; Fri, 21 May 2021 12:19:12 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YB29QJD0vdnX4UxgImNZVc2RHuxQBaUzbntP2Hp5A34hCV/gXJkwUCbZNTm+ZXodbodWZBSfZA0Y8RFx4+exejSIPCOi1l8v/tfgw9yXPJzg2RajfUpD2L/xbKm0HgxheR2er2Y02/ATqR5eMC55oP9D/XiY38GjYr2YFm8Jx8tbdiI7nwvnbpj5bE4EdN49dP/tAW1GW9LiqkbbEGUh6RiaBMq2xe1Ktu9FtqUIHEx8T7zwiFdvxHHEvAAUdS8Gv2IyRLidOZ51H1HKmdeqBkGAYgDTrN/cxPwH8yaz7WZ7ObiWhb3aO1vUqa3MU35B3StBh+VztEWZnIcwy4/OmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z32tRtgCz745A1bvJayxhXCGBtd5NhCsI4GbonX3e7Y=; b=VaW4gJlGKKBTN9Up5d+7MpjDdoG/VButncHToDb+DdYobB8YCiQAbQE2+nBmX53jsLlmqLO8bSjfzLkVWZC0uGfH0Ke4zMEvB4692mNrtwOD3+r4TbJnZ0wgqUd6zahXN0/E367ZmPp4ezOr68MQ7EtiYG8OFt/KYgWb7G2jyv1zH5hYLh4R0dm8hzEWF28vtrudh8zCxDQ9IOWFcWyBcH03ZeGtG76GG3uShQ+6XAnxIomK6ulM/a7CN5sNblgBmUMuYpClYYnWSJKMSC/6w/3ZERN/6oqF392spPSuWEQ/xMUSw0+rAf/W3vr2DeiFEVuBypcEnmVOPKz7ywvJBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z32tRtgCz745A1bvJayxhXCGBtd5NhCsI4GbonX3e7Y=; b=NJffpnPMgA/oWQsrFp7WGorkM20zXgFsTA9ueBvxgNTzxs7twQ6U0WEPZ1Qlr+Qn6vGXXMlDEui1zfHMlCRRAvOFq3Uk2KxBtJeQdYeQVox6hkt5OEbw/KnchJmJJTnyeNitTYugfpzZAbaztYJn5xLSWphsQL5lvHfpRWegitT5gNKyDWqGL8ovRU/qOYm9GD/mppvTdUYakhTlBGOpLhQnRlHeimKE3ucuE54J51NYq9wDYGBeJ3nCuY7qP2wlP5nJWu1LQrIn+bgTuikP8djZ/uTs+X53iIuQ1DJyt5jA5Cr7zHVwC5I5N9ZbcWm98yB92zjvZUV9D91up5/anw== Received: from DB3EUR04FT053.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::52) by DB3EUR04HT051.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::324) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Fri, 21 May 2021 09:19:11 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e0c::50) by DB3EUR04FT053.mail.protection.outlook.com (2a01:111:e400:7e0c::226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Fri, 21 May 2021 09:19:11 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:8FC5854D4A383DA8B7129ED6BC76002E166EDE1191D730B01981251A1A7BFCF5; UpperCasedChecksum:1045AFD3563D7FCA2C49DE30EA3B0344495B02A23CB80D6EB922B736C9241865; SizeAsReceived:7763; Count:50 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::f4cc:63fc:9cef:37fb]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::f4cc:63fc:9cef:37fb%6]) with mapi id 15.20.4150.025; Fri, 21 May 2021 09:19:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 May 2021 11:17:40 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [ppeE23ellkZF8oqDmB8TthR7AClyuTjp] X-ClientProxiedBy: PR0P264CA0070.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::34) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210521091742.184902-36-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.95.27) by PR0P264CA0070.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Fri, 21 May 2021 09:18:44 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 6532aff1-2d90-46cb-48fd-08d91c396e88 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UIohmq9k/yScywu9xPSfiUSAA3//7df3H3Xx+UCM99pYUXUcCz7C8hw/RIhlo5QkQIMBROWHfJLmVrcX/664U9L+FEHf62GdEW/iS0vPBtvsJxd5FblE9l3vq8OQFKvWOIVHpHEPnDUHONBO7crak5Qz1z1l7dr8iErbXiMEk5IWBUFb0nDqRofmj5drZr5NNlLi8atHQ55iQgw5Pn++T/No77B68fPNk/uejgWGfj3loXDH+q4dRGC+tOfFgGwL4A8dR17x7yAITC37KFkdARR+oBHM3kBvMlnU6eG39qzjmnuTMyvHCsJG4fi0Bn6x6cYIjysjfv+AgMi9NZRigGvS1LNpxeOunhQzwRTL2YgvWfFpz7VvbRDD5CjUzCDt4fJ+LU0AIEgu+nuprb00eNLNguDZ80XpKYIm9rx6iaMxA9OWQemVICl3AcCgoYHqIH0Nv01NbmY2qbBnfBxbSq/rEe8vVHW2Qbr6cadKSI2KM9cfBBhEZRCvM6cfq+m6OqkPaomlkl0sbuarlnJA2FmplY9mBagNg6xbzRQWk4r8pprl9zYFJ6SAWjAoW0dMdJ9e73UENT3CH8yB4W65k6sgwiaJM7zCFJYJV1VpG0x8EUdTbp4sVeVFCmwjeb8FEPbwiAehskkC9RMGMAoPcI92qVUx+MI80aOPLRQUh2uwZNFuDT0X9qjxl68z/WEMO75zHEZn0iQmw== X-MS-TrafficTypeDiagnostic: DB3EUR04HT051: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rHw5iWFM84OmeBYd/AUMlTDCYTTyyvgMVUiowUtP+Wt7cnLzMc8ACj0TPpVwmjYEqootZQuMXGNk9lluR/M5S0Nzr5zV/wmwQTTrwMe2gxRn83xkSLhBMcxRNT73ApOhIFAJxVD1WRrU4C6+UG83jYnqLRnCKdMo+1FzqBS6DjTnGGD+eYKkeLh6x3EGaMfEu0qMXuerZBwKKRVifZWCfecYStUJct90gvYoU8WrtDO912Ueby5CRqNp5DE5bkR6DNDL73v0HTWr+FzuXEX/cNSdxKpjaaRjwJwefUvJVY09uFwbMFrQXD8V0NPB4472GDA4rOJb0ZH9MFbd2fyclzNS40/G6wtVKal7TU23m+3NnOKOn+YJCpnPycP+29POW864SQw5FDYWB4vGdNMW0g== X-MS-Exchange-AntiSpam-MessageData: owT+RO5KC0Gby57urZP0rIjtc98vn/JYvYlITvb6raQOubIPpmn9EnkWnoVCSqmb+49Ggs2ahYgQiD6NXRiodOLigQHq0q/cJR1qK2jA+iPYcj1Yh++ovycOQQILsxbQwdM38aOOeczYL/2/aY8eqw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6532aff1-2d90-46cb-48fd-08d91c396e88 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2021 09:18:44.5103 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB3EUR04FT053.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT051 Subject: [FFmpeg-devel] [PATCH 37/39] doc/examples/extract_mvs: Explicitly free options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: sIhwNhK+7VsM The user should not rely on all options always being recognized (in particular not on error). Signed-off-by: Andreas Rheinhardt --- doc/examples/extract_mvs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c index 42e1844150..f5d2fd9179 100644 --- a/doc/examples/extract_mvs.c +++ b/doc/examples/extract_mvs.c @@ -104,7 +104,9 @@ static int open_codec_context(AVFormatContext *fmt_ctx, enum AVMediaType type) /* Init the video decoder */ av_dict_set(&opts, "flags2", "+export_mvs", 0); - if ((ret = avcodec_open2(dec_ctx, dec, &opts)) < 0) { + ret = avcodec_open2(dec_ctx, dec, &opts); + av_dict_free(&opts); + if (ret < 0) { fprintf(stderr, "Failed to open %s codec\n", av_get_media_type_string(type)); return ret;