From patchwork Tue Jun 15 23:32:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 28386 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:bbc9:0:0:0:0:0 with SMTP id c9csp126341ybk; Tue, 15 Jun 2021 16:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsjHeUzb13KK5RGBA9zMwSbw/dJYB0IW6+UxpPLxMBAkle0YCQBseB0MCiy8egZBynhM0o X-Received: by 2002:a17:907:1c13:: with SMTP id nc19mr2053223ejc.168.1623800387624; Tue, 15 Jun 2021 16:39:47 -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 m7si297749edd.133.2021.06.15.16.39.47; Tue, 15 Jun 2021 16:39:47 -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=asIq98RT; 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 8F86D68A0BB; Wed, 16 Jun 2021 02:34:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2107.outbound.protection.outlook.com [40.92.91.107]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D317068804C for ; Wed, 16 Jun 2021 02:34:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nAnqLbUb2AArkSJZmAELWKgYYfR5siiRI6nxvE/kAx2iuIq8eVPVzFKjY0Zb3zLJQ0XNzmTTo2lYOdrHfVjeM0w4mOrYgX7gsl2vbmE+qcXxfuandyXoiV3kbqTxeuJxf9WQMTo5KCzm4e0JkAIHYE/iIf3LpOrGBlyV1tsJu2TFN3WnYYtRwhBTDc0FyHXGBc/HZ9AoE/DfmNTWzaOjpckuJfIkDP6h/4eegxRyPF3x/FAe6istMvUftNmea7k0q3cGqq5fls4r/TV5I2JhvGR7teY1Y4vWcaon1a63fHV3avJD9APs+h8zy98F0lLAFbNHACV1hhy1A2DjvuMxTw== 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=ZUstnRB5OjJvYDMjzO0QddCF8Fiy7WJxSnOs1o8Qbt0=; b=bBzj2HyHMJawIFFNboFNoUyMSBMoAEkiczluuafsIQ+vmCeWIjJ1ULg9J9QosvVG9oZpFxKkgXtbXHDgldzsERitbKVugjx1JXIZmMsgiiD8z5uLsVH+AiCEb830OGsemO/qzdILs7vaSEx43eVxOWVrMhuwcdEVcQXz0Y5P+/vQP95yf6Hj5MPx7FxCwP+gKcggTCVgA8BHWm/wzuca+1j48JK9d9rNSR8FqNupu3+fSMXSHwL07Q7jLCQ0AAGwWmDfDnD97S7DKG3QPheUc5Iju4Nk/omffp0CLHoQm/nqF9sT8lJaArUKhuj8VMfrCLcoQH4T9MFk19I6MkHb4Q== 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=ZUstnRB5OjJvYDMjzO0QddCF8Fiy7WJxSnOs1o8Qbt0=; b=asIq98RTOoULe7IVDrcPEw5TYKHI4xOQOZNNt6OE4dEx7jomxdz+I+FhKy+SZbckNKmAY+E7czvhXMYXm/rCuTgrhUeVo0nQYVp1d6XGufhiACzEZ/7ZJnOq4y91sQ7OX61O5YWE1+SMxlzE0afo6dy0fzmhMBWtzua50PcVS5uhZX/X6U/QyRToRwA/YlU0AzumMqD2oG1Gx2E7MRaB3a+sQ/RB228hJmWdbUgs635MsvReSwHOJGZvGgqz2zuqbGgXbgt98yObvP5L6qwAMY2dX0ST9mmCB9uf6WK4EqTpI01Xlq7p2s8hOvXMblbnv3aBz0DvN8bVryBwIiEMpQ== Received: from DB8EUR05FT027.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::47) by DB8EUR05HT142.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::315) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Tue, 15 Jun 2021 23:34:37 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc0f::45) by DB8EUR05FT027.mail.protection.outlook.com (2a01:111:e400:fc0f::448) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 15 Jun 2021 23:34:37 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:BD5D6199FF266773A3834FD9D577A7B5720389655BA46B85BDCAB14581114919; UpperCasedChecksum:A29650F968A13D9C8320400C77F4407ADB39E7E3E7DC250543A54609399D0549; SizeAsReceived:7775; 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.4219.025; Tue, 15 Jun 2021 23:34:37 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 16 Jun 2021 01:32:34 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [03s1VLu5LRTOju/gZh6Kq897zZj7U4vz] X-ClientProxiedBy: PR3P189CA0063.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:b4::8) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210615233243.1173928-44-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.97.82) by PR3P189CA0063.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:b4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend Transport; Tue, 15 Jun 2021 23:34:22 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: d971783b-b0ae-4472-c237-08d930561af2 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiR9SlwCHtPrt+MV8TUUwp4pptWyrQdC/n7LELivV0hd9xlCmlOveRrS9yaA5ybV4QpFYySaMyfDM5fLP66p/gAZUo9N3b5sETK/w1r5foswU9/8Kv9YLB4Zry4vRn2uvst71abVIWvPSr/OkHUegqrkYb3gqOUsBpTYXPWPAg5BzOUqfSspeugiTVmeks/giC03/rumFiCSqKuFNDn8MC8BewH0WTMNNNr/4FNpVs/7G9qORVYhJWU9sDexaPcZr483Q0khy2VmTyifzTUdnemWz9XdDnDPjOEA1TL7ZFGnb/an6pc6DTmR8JRAhRKgqTlrGVo/o4j6YMZTgIVFDQfwkZoBDQ7yGJmlkojsNPD5/CK/cz3hRWYzwi8GZjvGKdbBgdDPd8EujgKQAKcGzD+hwEmiCqVmzK5/JJ3Ppw4ECT/JdK5Xr4pxPTUwwa3xCTC0LOkx7IM3fSH7X+/iReabovyvkQvGFLttyN6gkyNFTEzVRBnmS+oX0AESr/kh/cSb4HfwT5tOcI/qdXTZ+HG3LDAZ8CxU11+6v6YvMMlod6orzR6qpghsKhWAV4gMmswTXysAygH3I9uML1XgduVUavd6uKSMwquMoI7tdbn/wChddZHdK0PHfdn/P84I/fnGsuNdtgBi0MhBYkokP72ByONad5q3e/PyJVEzsSSzSYDFJ3UKCARFOhCl74MztM5J0jVGkwv6Mc2ZCRrYS6EtoeZvIfd+Ea4UmAnrzclEU5yVjfywvqP4kYr1XQgAke8= X-MS-TrafficTypeDiagnostic: DB8EUR05HT142: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UstwVoroqaxBd6d0S79GkX9r/9ZnhO8v4dQNzdY5bWqo6iiRHSlJ3qoQijlbtSW7Uhx7BfIRrj2AYj3Y0aqkRYZcDxAOu0Y9z08Ki49MkYagkw1dA1t0JPNexKGEjarCNARWOBcp7r8SlWt2tcIFHEcK+kPyOdkAVcAQigQ7b6W+Bg73VL6PHyRjbWR7talxtZEaOUxRCn03AvlwjwMVdxFnUHQ+d74CIl3vAcRgolaUYJXL5aL7Qpq/pd1tHyl7DO90heQWKGoymXrBDQDCQvd+YZcX0GCEztsqjN+kgTAvu4H8SHkiNJ5/sqjLrobtIs9aTnVfauhjOvQp9cRYYVwYaMlC34ckqjYw3pZ9VU/mlq7kPGRavu5PPPBw2gjWHKHIk6NyqkzTC49RCO4LQg== X-MS-Exchange-AntiSpam-MessageData: t5fCnnJjwSUh6aUvh8FRJ/XrstAE7rQrrDRc9fHBpKlimn7qdM52jg6OEysSBfQv9HzEpotBNFqOAABo4+5PKafpq9xxvd0o/yqLDqLmDftfNYrlFduhZq/soHHZXuAjm7Aghr+9qxLOmpSj/f/xQA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d971783b-b0ae-4472-c237-08d930561af2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 23:34:23.0692 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR05FT027.eop-eur05.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: DB8EUR05HT142 Subject: [FFmpeg-devel] [PATCH 45/54] avformat/subviewerdec: Simplify cleanup after read_header failure 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: UViU0GOaqCJq Content-Length: 1293 by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavformat/subviewerdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c index 9bb7728407..2ef3c088eb 100644 --- a/libavformat/subviewerdec.c +++ b/libavformat/subviewerdec.c @@ -176,8 +176,6 @@ static int subviewer_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, &subviewer->q); end: - if (res < 0) - ff_subtitles_queue_clean(&subviewer->q); av_bprint_finalize(&header, NULL); return res; } @@ -207,6 +205,7 @@ const AVInputFormat ff_subviewer_demuxer = { .name = "subviewer", .long_name = NULL_IF_CONFIG_SMALL("SubViewer subtitle format"), .priv_data_size = sizeof(SubViewerContext), + .flags_internal = FF_FMT_INIT_CLEANUP, .read_probe = subviewer_probe, .read_header = subviewer_read_header, .read_packet = subviewer_read_packet,