From patchwork Thu Sep 23 15:06:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30482 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp543875iob; Thu, 23 Sep 2021 08:07:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyddz1XffM+WBeaS4z9hoFAT9qvmTzH3YiPciJAdBJjF/UUlScDq/GrUVW1u/QIro1NJaL8 X-Received: by 2002:a50:be87:: with SMTP id b7mr5910972edk.333.1632409650529; Thu, 23 Sep 2021 08:07:30 -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 x17si5778478eds.602.2021.09.23.08.07.29; Thu, 23 Sep 2021 08:07:30 -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="MWcMA4R/"; 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 E68C168A7DD; Thu, 23 Sep 2021 18:07:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075091.outbound.protection.outlook.com [40.92.75.91]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9A5E968A4C5 for ; Thu, 23 Sep 2021 18:07:18 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m0w1QqyepkoSlbxxi+v4rSkgJvp1xrn9Uj/tMLAp00D/Arn5T294lR+oR8bGsa3vWFeQSXfhiopc3GnzgtdrcgHj4Np0o9P1CaExmf9IxonEW5W29mhB7BPDj/+JoaL3PBVm6J12x1yG6kpuFaEFeAG2edryqRdH3Ilhz2ve6DHWkK6wgd+BOI1xqcgrMFswT2D1jAPnH9UhF+DSJSIRDVU4eQTUWCoFpHudZ++1P4nmt781opP+5vaJEdm1tXrf29K9sAbNb4Vd7Zgidm0NDoBN62SVSiDdnjFcSQMMV8wd5S3zC2D6wIual3HkgpytYuO7Wal6TLq8b9DHwJcS3Q== 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; bh=4GjZfk8scY0J0BBgN0CB0lHO9n9yI4RYH3XkmuYPQ5A=; b=AGOvRv8z4CZ/Om165Zk1FtE57a9ruCS2OqNfwxDCMmib0s8wcH97Gj2MBT8JDp4EV3h73hwK0j1sadVsS+i7622BndVCUvEWOBXEWduRBm8oAPfgKfk7nMUxKJJpDzOS4nXFbj+sFjup3HVNOzCEyZl47+Y4AxbsqZithDVuKXBvp5cpCzR5laIZDOTiazPCEMx7bECk7BeUp5Ed/iMdLAbyPZpiTfA3twLyGJELPRqk2HuyrFS6Ujpl1pOsTw0yMDg0ty1PPZUdDF/6NfAWObORD32gsMqyogKR0LSesxGP8xvTdGwG4hSaiv2mK3vLiFedpMD+yMq6II4191yxsg== 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=4GjZfk8scY0J0BBgN0CB0lHO9n9yI4RYH3XkmuYPQ5A=; b=MWcMA4R/sMA8l7d3vgIwekDRZ9B4k9ZG3I8z28k3q+c0d9kmraq3fCQ8j4J+QOW49k/QFzR7aQuPbK7JDwKVXvXgnzE/bstUywvCcU0j7THsB+NzenrCQzcnY4xs0srvgS+DS3sGtGniPmPgqnP8sEG58fMEyJwQlHDRXrdqEO3e4+Ib9xiVhvUFnaBRj5u+jpFzUBnj09kM5DNwDbbtExCKbWLnHEN0g0fzTqhQNnFvP5EsuIH/791l4dciTJXLAEN/uHeuh6+GnH371VUWr5X7GXcNhHDug5xa4obKbs0S5CShxRxwoJ2aLKcBZIABSq2QrTnG09f6FlQaeLtTpQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM5PR03MB3009.eurprd03.prod.outlook.com (2603:10a6:206:18::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.18; Thu, 23 Sep 2021 15:07:16 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:07:16 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:06:41 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [dtoasygBZAqRQsKaEZ/o6lOPkCXPjlKQ] X-ClientProxiedBy: AM3PR07CA0081.eurprd07.prod.outlook.com (2603:10a6:207:6::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923150707.42786-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM3PR07CA0081.eurprd07.prod.outlook.com (2603:10a6:207:6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.7 via Frontend Transport; Thu, 23 Sep 2021 15:07:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: de6f3b5f-ee5d-4a07-b664-08d97ea3d474 X-MS-Exchange-SLBlob-MailProps: f36zkjAOy3UuTYk0YBKgUpaEqMowN4GwiZkpA4+K7rLQbzMHP4Z58yRyArV6ERdBbLY0q24/Xya/72KSVDgZazOp2UUahmLElrsWq1MHj4zDZOuy/cmEsBXXXooOPNhAnioAcWO69E7CZ+8W6hCF6ozOEI5W0jka8xYkHLWzVt5rovJjM4dqA0v0wybkhi/Hrxs9sG8Lr1T+ydBxpcir48iB3w956lcSwRMpcPIO4fFn6gCO8DqFtdPqrwFP0j/0zFKRy7utEpYt4OnQHmYGr9oGB3K5ImasojZl3A2mxvgMh55xdlf+iht/36FU9jSnuDmC3vK/H08rDwE9l8ocwaeaPNQPdA+8B/uqyQvkDiNs4Lav0oRz9riIFMlKTC9JyV6M6DRSFFHhht/i8/l/J+rbu8FlMVaxUxJNBjIMOf3A4JYGX5Gfs1PoA2GbNyuaihUl3A3D4Bqoi7L/aJsXoFHkJN149Ovijh8ej4IreI/7cR+ehSF0wjg1jh8X4m5fe72qCpvL+LTqEVb2k1MzU4NrOv0yyU2vGi7vy6s/OMXpzkpLV+MfCQcg2BUkHe6F9n70o3Y1P2V7QbOaj5bq4x/Zz2BVdMHvjXUFHwM1FVLdHoVoCWcoemYVRTe/6q+By763/1uLwV49BVWe67Kmv+ORLofGNxWAdrSg43gNu+reEei4vy/cCTdH3ZknVZ4G9vfVORtKbe6HLR8IQl5g4xCpGH5nFvphrdTuzhpQtJs= X-MS-TrafficTypeDiagnostic: AM5PR03MB3009: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EKgJQ9U/izdnYq829+rAl1DbkTgT/ouUhzuqDLTUQe8b+l95dug7FDsmbhiptqWOr/NtApLqn81URS+IcEZm5aHElbUysTh+IOjM64r1Tc4h4VCbSwPgIeD9BFu76uhUQkgZeuUlrpIrIVz/wEwuSO91nKmW8QtxqhdnokApdeWdgf9PMilF0XmAw/fvZXE7DCPGwxtldn+vsrTg/wRv3qXYNIJrLLi5UdWEEgK7Unrh2uV2lRiT0rAQcagew20k1jVmDYR/AfKXdQC7l/M1okuXSpy9qACa4s5UpW36qyoYqgMijfehrPC8exrBs9FnLJIk74U6ieRHBnImiGQ+PmiD9Otd9uCT48GOIZ+SCNnZR4clpsJRnkxT1zpD+Jf+EFtBhgxtB+NhSP60DZPtCiiT8AwvsUwARWQDcmhW6dK5ZcPKYTd7aFZ7k12N+JAK X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mriyER6liVdrnF1XfoHRqHRGnpsKrE60u4YJuUsj2XD5+N0Rkqb643IzhJbKqB8jV0o9N4NwM3Fut9biHJ35L4KqVemWv4zHr87t/QkIIZt22BifkWCdmvFnK9EnpENxB5JPyC6wV6T++5S6ukw+Pg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: de6f3b5f-ee5d-4a07-b664-08d97ea3d474 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:07:16.3363 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR03MB3009 Subject: [FFmpeg-devel] [PATCH 01/27] avformat/astenc: Simplify writing padding 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: C0ZKtAqLI4ok Signed-off-by: Andreas Rheinhardt --- libavformat/astenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/astenc.c b/libavformat/astenc.c index cf75b48b21..a5792e0b07 100644 --- a/libavformat/astenc.c +++ b/libavformat/astenc.c @@ -118,9 +118,7 @@ static int ast_write_packet(AVFormatContext *s, AVPacket *pkt) avio_wb32(pb, size); /* Block size */ /* padding */ - avio_wb64(pb, 0); - avio_wb64(pb, 0); - avio_wb64(pb, 0); + ffio_fill(pb, 0, 24); avio_write(pb, pkt->data, pkt->size); From patchwork Thu Sep 23 15:28:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30483 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp565497iob; Thu, 23 Sep 2021 08:29:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4ynVPlyNVoQRtA0BL/IWGEmkXj5WD7CkqZcp7zZ8b7B0gW6DXpkLRkc3/ESPjEixsc+vS X-Received: by 2002:a17:906:158f:: with SMTP id k15mr5793066ejd.241.1632410963333; Thu, 23 Sep 2021 08:29:23 -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 f21si6436838eds.595.2021.09.23.08.29.22; Thu, 23 Sep 2021 08:29:23 -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=tvTABs8O; 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 04B3268A929; Thu, 23 Sep 2021 18:29:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 84AF3689C28 for ; Thu, 23 Sep 2021 18:29:12 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fj1aXQnNjS9O8KDUi/T4MHTXTe9Ug9xrMJoNmiLdBfO9BGyMqUmFcQMYTDUTUTBnTs1zbG1uDJ8RqndHp7J6sp3KbwnhC2RLYoJGlR7Xc4a+PB3pl5nlk8S2+jb7ssrTQOFH3Pe0R/q1KO9UAFK5pxbbPEMcLlNVI2XEhqLGwJnenFKDuCs88Yy0Me2Nb+4BYMi5GAb4zIi+SIYPGYP8UgM7XYbnUiu5xnfsgS3xPxy3hCK/NmbE9/nA9x8f1gIt+eEreXB6+PIUYfLRFCMz6kr9CKOqJxS6HLx2nFba4kpaTT/hFA31XEfJtryB0e1ra+9x1NJQjj9jcWMokvPiAA== 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; bh=v7zZiQ3GdAmZKzUkHkPPJZ2mzLabSBSYFITjJcx1MCk=; b=PJG14vCsNJufsQn9uxl8B7kLph2Oy+9O1ubC0XhhQ0KJ763++yqToZUNscT9TCkcrsLC8aEY5C7p1aT1qNkSecUUgWzdIgcye9iVS+Ly0VXQZVuxJRi46seNzR2oTtxYpOTSCA6OBLhe4H6vs3l2U9gkCkVlhgFNHfauG+TIwvkl8A4Vs3i1/6hFusVwXC8W2vm1B7uCqK20sq1goWWOX4m/9NRozhnkjmEd/n/nfLPdbOLQHGYtSgznXJ2BmAzzsfObu6Mqe3jqFDMQ6UjaKPjymZZR51OgZgmq/ntSTVLsYUq5yIHlGfGLs5Bys6OK0RkJ6hPhjJrAtw8bMuvF4Q== 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=v7zZiQ3GdAmZKzUkHkPPJZ2mzLabSBSYFITjJcx1MCk=; b=tvTABs8OKdAzMVGS10fuZVEPvztj8G3/CRRIhxCT4e8upD/EigunL/1GHg3flI2KvdsOC+3VruvCwHyw72j0JVsbtJTrXU7KwBR2Q3pkgzDCx+Zjntkw8LdYLscHHbS0CDH7At6wVA967xDySznaIaM1ex3+Pfb3sIU2A3dnf0qDr82UcC0UTEzt8ubkUg82sYwsptcewuOcnEpQZ7kME3L9cdgIlKybObTr7NaJypOwbJbdOrWGS0GAIWgAnZS9eRED12W3hcGilaytNlftbvh8q69PwiG6zchc2vNJDW5Jz4RZV+9YtrqjtESCXxv4GfL0FLNcCRM/Gn+XgnfOYg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:11 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:11 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:37 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [AiprxXKlnQi77g5hYUJo9kuH0zCTkiFw] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 867c5d8c-a007-4f7b-1fa9-08d97ea6e430 X-MS-Exchange-SLBlob-MailProps: f36zkjAOy3UuTYk0YBKgUpaEqMowN4GwiZkpA4+K7rLQbzMHP4Z58z6NqjpPThcPIPoCRiwm0qTrLNEjn9TgE7BVS40io1evpfXQn4us/YIbYUwjKx8y6kz0KSO5KH5OfQXa2NQs3C2bQ7lEQLwuSQnZczfaDjOib6oaV01MFRune9HjxxQcLWjsmi68dFFsIkHHYTDZRcvOR8AcRh6SA6/yImrwfhPdhGMxWRSGDoapbcgcK5vxteFNUV+zWfeWvCbfi3GEvgvDrJ3mczC97nAO59UTJ7Wy3Hm4ru6DJ0gVAGpkR4eHocLVa9oXkrG4HckBOGqDBr7pi58dgPNhHpHmCZTzxi+dVNole2HEmLXxzspDxIed4VJVjFSqW3IHbOSVlmzyKNZva3dlEZRv0w5Lf8XVvG6BIuV4fydema5O5ZIzGozXnM+zz9rEr9veZxkL2tk0DC2fnLsRUhjOFQ0mo4Pt82HagGaqui55KDy7tqMbzhF6asIVcJr11jU7Ac5KC5r5h1Ss2mHQ91IJPqEapBhe9jSGc+lq24mbmsP9FuK3fRUzDHuK7MVDlANJw5H9sK02UMm4IdWN0mXw0JYKMiTyev6oEREJMRJO5AkAQAvUhdiY6UAj2X6vf7jY1VwBR86gCurYg6hdsfA4H4IxTLAPAy5XZxmPo3Xsj/6rDokHnJpEFhiiBa/T+u+0hU+qkK5Z9xuY1i1THugbJTrGLohGUe1xJSg0T2GO8r4= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PHh6g5nEPh3VTUai9F4xY7gdDM3zNzZDYt7igoF4ofMhZdJEYmC1MwZwGRk+dQLj7mc5vTrZIPq5mdPREimRNkCnRKtJfY8hlA/EmP2paRCfJ5w5KINpWfEGujZkv6YwYuS1cgaeCi49q7jQbnG8bcQvBGpDBr1oOxX/IFIuoX2S10Fzr3BVyS5aiNF1mfVCm2XqiZn5BeoWW1q8pfdys4uTUMw9pHtllnLn3JZC+NuGia1PRnh+lPVcodWVoBtNUPHdCSq+m33qmKn+783/mAFu5lbyNQZ3UN1ObvbjNWX6uX5cz8yAIRkqO3CN1T4WZ9gx+VcYKHlOCQhcwHt+qf5+RTvedEOUg7ox7MY1YInQzMsaqBf1UzxQFaOKRsnu2kA3KtW9JXAlfMkDveJ+bdKdmBl1UwK37SjmTvOWCeFr71Ws/EGTYBaroHpnsCLT X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2IleTFHr/5uB1F5fk4Sev8+Sr8PhgIyMvlmJfucSC5N0lOuMPjSvc44E83AoTpd41NdNi2X8ohImCEDaXY1JC7kb16WxjeX14G8fuvTuOW4osLWtJCt8lUgzZCP85mVGP4GEtbwVjZzVYVEzDZzeHw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 867c5d8c-a007-4f7b-1fa9-08d97ea6e430 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:10.9876 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 02/27] avformat/chromaprint: Add deinit function 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: Glypya7HT8n5 Fixes memleaks in case the trailer is never written. Signed-off-by: Andreas Rheinhardt --- libavformat/chromaprint.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c index 399de725d3..b7a943e126 100644 --- a/libavformat/chromaprint.c +++ b/libavformat/chromaprint.c @@ -47,8 +47,10 @@ typedef struct ChromaprintMuxContext { #endif } ChromaprintMuxContext; -static void cleanup(ChromaprintMuxContext *cpr) +static void deinit(AVFormatContext *s) { + ChromaprintMuxContext *const cpr = s->priv_data; + if (cpr->ctx) { ff_lock_avformat(); chromaprint_free(cpr->ctx); @@ -107,7 +109,6 @@ static int write_header(AVFormatContext *s) return 0; fail: - cleanup(cpr); return AVERROR(EINVAL); } @@ -156,7 +157,6 @@ fail: chromaprint_dealloc(fp); if (enc_fp) chromaprint_dealloc(enc_fp); - cleanup(cpr); return ret; } @@ -187,6 +187,7 @@ const AVOutputFormat ff_chromaprint_muxer = { .write_header = write_header, .write_packet = write_packet, .write_trailer = write_trailer, + .deinit = deinit, .flags = AVFMT_NOTIMESTAMPS, .priv_class = &chromaprint_class, }; From patchwork Thu Sep 23 15:28:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30485 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp565633iob; Thu, 23 Sep 2021 08:29:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3t2bVl0OW+2TrioolcubxG9ujd96+UZwp8kDwS3++OQf14ZNUAawcvbCYmn4jwKZIN3ft X-Received: by 2002:a17:906:1f09:: with SMTP id w9mr5905633ejj.472.1632410972830; Thu, 23 Sep 2021 08:29:32 -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 i13si6511841ejo.684.2021.09.23.08.29.32; Thu, 23 Sep 2021 08:29:32 -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=FqyqIGHZ; 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 0E8B268A936; Thu, 23 Sep 2021 18:29:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BB9FA68A6EE for ; Thu, 23 Sep 2021 18:29:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O1JlvvX7f8MEH4yEqoIjbxmyPp6qaFjpC1oXruq/OTyt6GWxiAs7UopKIqu0EoYRbN0WDvoWwnVh1RFL16BN8C1oTuO6uAruyfDNZ5UnkCs3Xintrr0i2QmyB0aAKbu40dA20MG+CTeRDeXR7TDjJkn/0ak7x+NfOazybrC00SOX4EXUzKnHV74Gy4bLqkiyMFvg0cKezluWXWFemL2iBwAkw01JrkvBDPiINtZLFHrErqVxZCjGJfhaRVuyFAN5JIcnXxrTyPAjR4eDjr5LQU6CvjSCNb/tga8SXGjNUSHIHMh5UfTBxRFqVQC/NriCtF0F51JMWr9P/4ABtbEHFA== 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; bh=MMyp51oPh88bA5Hm4fK8SX2+oeb/x+xr0bSl5LL12ZE=; b=VK6zL6EqWI3PfgD8poMbk4w8J1hI/cWOhjbkPqtKoMDBWOSylhZ2CgG6NoP+H4yVhtg1cTGo9pWB9kPkV0lE8EY9mGJuw+boNsfkKCWOPla4Ldx94fBogqHxw0Wns8A1qE1fbTxwJEDVnSj5oBhA7qQguna+NeVMzC8cVoVjjhKMvAyLG6FXABZS2r6UXDWimYlJUAh7V7DhnF8WqvQGGeTeplpJeFQz7A/l+thiFxDo16Kpj33QW3nFFUowwYZSIzPZTp+KGzt/cVci7PRXtkMgDiwylwGLYIKqmBYgNoNr7MqwpLO90fEj9vIQ+U0NCAxNqTP7piaKAYf4Ci5I9Q== 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=MMyp51oPh88bA5Hm4fK8SX2+oeb/x+xr0bSl5LL12ZE=; b=FqyqIGHZSJLpqVFHWZijGK5pUChaFeklhD7+kbcb+x8YFIDQgWhEIN+35sKUkHXRE7VHqOIfPaS5qszBUO+rMfL8f6LqLA+6Mo6Z/3POOerwu59WTBJrGZ6TRF5hk45uyjAokdLs/hEjnHvCrdBE/sNmE18PzzZNErBITL51ctRRzqtAdkUIkUufv+Hc54LA02QPAzNi+0T1EHCXPJaxRpFthfCyTFpM0FqPhzSIeR5ozboPAy0c/mEa6QA4QP6QiTZPUx8r10NIQAOrjYPKPblSbxRBxlTidKsbWL/rK18J25GrcxLnIRq3YvopaYvtwAqmE/tqXBjPVRfiOztpPA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:13 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:13 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:38 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [oTKGRGxA28T4kn9x16t11wuc7sHV2huQ] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 997b1b54-30d4-43af-1ce0-08d97ea6e573 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWt8qMG3IjM1pM+gnFiFAdP6pBqN8o2M3s8S0mVmw3eTG4zFj54oiZbawbrfW1NYPjrMKpYcyYrOrwPSyK2X7KXsvsFxUToahKN2pg/gHKODfjkDO/EqTWulR/6iMa9I9iHiCWghueUE+03GlYSSe3LxCv+K4+SeR6+7KDgUa2Jkjpqdo12n7SnRXhHueE4BpjeA0MhXTmB7gpvR3zyIsZj+YyAsz1S/NNSUXYNI8MyvaotO+dScXjDhU+UI8fyO0zSsiXOX/nANKAgBs0oehAv4rQGSObS5PCwMknV+mKykS+lEBopgsn7wectH4N4VEQq29lQZogtLoAu3CuwjmS6xlzXVXFJVLkDHBzSOsUyyM1L+zsBZKsXHwgo4EaPnlWjxcgRRWGicCjkNVfCfMmNqR8jvYGd8j+UkuefCIqbGA1zqwu2YL4oN7RuV/CSZGshtQmtAgXdNcuLH482Wv3ZG6fPwhxspN57DQJ7UoU/5t2Up81X7UXlOQokhxZps1wITXGohlSoqt9r+ov1EEgrri6T/uQWrVhQVAz2msFyHdBS4SX+tTiiEWaOrWag1I5I2R9gqByWRA2Y5+RFF91X2FEiHaHvAq7MEyZwfqjXSNSr79qW3n7bhMZ9rCaGhqqFdWOQ+nEasg4x1fu8wJ6dHwPRibFExzCqDvHT5k5OxXPUkHpr/amkQaSd38eUdtc2c7i7pi/YPfW/VZvBRXd0Z6wC4zfRMo4= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v1flHeW7JTiXVT334ykytdydWAt3syiEONcKCVMB7GCtk0g1aznvdmb8mowNQCcuqw0MDKRR6IFLCF1zn0auooZaclqdvfgwWxyofOLyl+EUc+7LrCRbIgz1pNLuCcjI/lAB83qYdJ1hMuIjZmvBACmCRvO7UmbxaujeC/zlQ7Qxa/ztJwgYCahAX332JUHbhHl+y7zQBcHMyxH3/nRwt6ysjURkYgDVT/EUoKq8QV2j9fz8V2Mu4D6+AZxMJMnp98O6DSzEatf4IgGxpWjGT+Zd/9h98vbkwCyPumxxW/mFJMCxPIC/+GkytDZJdQ4jO3o29absfqF4SfTPOtiRn/eKEvbP/uSBDC9V1ipx0t1N4QMh07wB8qxux28MqA2RPDgxUNY7BTl3IgZi0XN26jp7PWhGN3QIc5eOURQQgBnmdRK4H4ggnIyVtdU8Yxvh X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OvU8z30kS/yLOWDvIshivsjMKr0we9gAFbnxO6FnKFmPNutALEIC2i4NQb42jzVLgx647f+aI5Rmdce+g6Y2wvRmhuYYBl1X8wQl3m+MeqKtTSBKdec3/TVIAPdqB0zdZBN+vKYJrWKeWvvsMVAlVg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 997b1b54-30d4-43af-1ce0-08d97ea6e573 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:13.0814 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 03/27] avformat/chromaprint: Improve returned error codes 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: ZMJhoO3JQ6ka Signed-off-by: Andreas Rheinhardt --- libavformat/chromaprint.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c index b7a943e126..e4882c8e61 100644 --- a/libavformat/chromaprint.c +++ b/libavformat/chromaprint.c @@ -69,47 +69,45 @@ static int write_header(AVFormatContext *s) if (!cpr->ctx) { av_log(s, AV_LOG_ERROR, "Failed to create chromaprint context.\n"); - return AVERROR(ENOMEM); + return AVERROR_EXTERNAL; } if (cpr->silence_threshold != -1) { #if CPR_VERSION_INT >= AV_VERSION_INT(0, 7, 0) if (!chromaprint_set_option(cpr->ctx, "silence_threshold", cpr->silence_threshold)) { av_log(s, AV_LOG_ERROR, "Failed to set silence threshold. Setting silence_threshold requires -algorithm 3 option.\n"); - goto fail; + return AVERROR_EXTERNAL; } #else av_log(s, AV_LOG_ERROR, "Setting the silence threshold requires Chromaprint " "version 0.7.0 or later.\n"); - goto fail; + return AVERROR(ENOSYS); #endif } if (s->nb_streams != 1) { av_log(s, AV_LOG_ERROR, "Only one stream is supported\n"); - goto fail; + return AVERROR(EINVAL); } st = s->streams[0]; if (st->codecpar->channels > 2) { av_log(s, AV_LOG_ERROR, "Only up to 2 channels are supported\n"); - goto fail; + return AVERROR(EINVAL); } if (st->codecpar->sample_rate < 1000) { av_log(s, AV_LOG_ERROR, "Sampling rate must be at least 1000\n"); - goto fail; + return AVERROR(EINVAL); } if (!chromaprint_start(cpr->ctx, st->codecpar->sample_rate, st->codecpar->channels)) { av_log(s, AV_LOG_ERROR, "Failed to start chromaprint\n"); - goto fail; + return AVERROR_EXTERNAL; } return 0; -fail: - return AVERROR(EINVAL); } static int write_packet(AVFormatContext *s, AVPacket *pkt) @@ -124,7 +122,7 @@ static int write_trailer(AVFormatContext *s) AVIOContext *pb = s->pb; void *fp = NULL; char *enc_fp = NULL; - int size, enc_size, ret = AVERROR(EINVAL); + int size, enc_size, ret = AVERROR_EXTERNAL; if (!chromaprint_finish(cpr->ctx)) { av_log(s, AV_LOG_ERROR, "Failed to generate fingerprint\n"); From patchwork Thu Sep 23 15:28:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30484 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp565767iob; Thu, 23 Sep 2021 08:29:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYQ25pXepUfZ6Qj/U4St1j6+CBMwAkMIpdfpcrbT2lNGdqnyq0mBTd20aT5t3d9wipWKOj X-Received: by 2002:a17:906:942:: with SMTP id j2mr5848435ejd.303.1632410984948; Thu, 23 Sep 2021 08:29:44 -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 m15si6271282edp.413.2021.09.23.08.29.44; Thu, 23 Sep 2021 08:29:44 -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=ngjjEkto; 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 1150768A920; Thu, 23 Sep 2021 18:29:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E360468A920 for ; Thu, 23 Sep 2021 18:29:22 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=STNBEyu/OiardOjkOUTf20e1Wbm+sCAWScaqfFcEz1kONbr/IQIcV2irkj9K5P053Ld/8XoQ2UJ0q7EVFH+frklV4pMLWQsm0sbcZ4ZN+qAUbpgCVpC1wVBY/r934zqgzWA7CrLJUy04+f9+AyQ8tLMee+qUEnQpNU3i0AsnyS8wVVTwn5SejIm5dmYBZgh/YmuSkep5C3/1uMAPudkccWCZva1K94ggoRS0vfjE9cw221cJpjOs+UJ/zXbhiGjHhuPUvfBpFtmcaKvyICKc49qcYQkG50MBy19b63PhCwsBmeaE8kNImbX1mEFcGCBRgMEaWSXNMCM6T3ZIsZH6+Q== 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; bh=//2+xNSHTQDOehc0ZV8MKRzz/ipvPjkrUsEQiOLdk8o=; b=jDukx4+zTjtIJgsApT3Hecy9fxOA7VP9qvllWuYeXcAzmt4XvYW07GCpCKI3Bu04++LSvf1ZAurfNDItKnFrKkKWcGGikDYy8rpmzK6P9MCLjsF6V5GrAsfrTkdDW73XCEOvx6yEZByRDnkKqNYSmU2qPZccvHe4WsC85OHatq28unQE0jjPfTybFaArGJHRBRIWlzKWezTIIKsJeVsTFbCL4O4l7SeQ0jbz6b5Icl3ANC+bMquDk4wJKN967yp7zvRuLeErabjeMuR6Klsj7HBZbzrU77tt+WvUQY1UncmdpABuWCtDlqa3xUXwyouMJUyoyudTDqP1vs/mgBxuxw== 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=//2+xNSHTQDOehc0ZV8MKRzz/ipvPjkrUsEQiOLdk8o=; b=ngjjEktoaJsHVOfwy6Q4ksXFwvji5+c673LcJzLnGgjxwuJf/UDFpzXUCD4A4/hdKcBZzlpPv9/dWxC4LYZlwNFILOA/UtzrF5akNqB/k5R97LJ9yDX+hNRjmcA2mUGRPdhzerqJE5YNMkYeAO7DUvSwwaKNjSVdcUk3oIWRCHTBTRgez5ImTDOtm6BELHTkY31RB9MHzhd+fXqtqXIGfYx61dn6TIrmpmkedMra//4LC/VgXdD3ojFCOul0XH2O+CMb1SVBXLWyC8F2W2msi/Eh8VI1gWtZ4RJpO4oxzxvymkDE9xP0sAXcoOF8l05qKza1aiurMOrKE+z/p2+inw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:18 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:39 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [xsoBkUPfJe+q/OxiHJJK1WT5/e49x9CY] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4cdb25f3-390c-481d-fb61-08d97ea6e862 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSt6lCu5VWoqEQVrP+7ApeAjAOALlIxb/5MRouUQAzEEfF78t0j/ScJP1CV6kCCTaGJMqsc0lWwU/SyzWOineR/aLlwW7XA0CQ/IJaJ76eGPyPxxZzHtT5xq55+zBKNwOrJNsyOHzUIrKDOgMIDmPG/60TUYrFL/tRCKsZBEm510doFyFSmv8V2fLcUfxb+P9ss7oxn18wusWcKU43AM5T0nknLuZNuUt/5Bey9tPTitpXs/TYbIW5ssS6LrAa6qC2UBrgfr5kNw1e2+0EsXc1HVAjYlMymI2n8T5Gu3yOW1B8ftHqTArHCqo5uTQRZvgoiUJeWPCOLo/SuufMTwkzHdNOEOC5c1R0Z/bfnBSASpjlvuZtA4iWQkq3DRs0tBeAUoXetzPoB1PR4nJuM4S450fi+MJZbbCmnz+wEGXnnb61uRShaa4wjvBZdkOdBoc98y7zqHsstlOmySV7XhqArSdsqbfMFQ3lpdU/k2LDncXmlxFzDXxk9WcGvw50EQ/QzZORKEPNa753SQkav3UP/EzT2SOAP4v4MrJi55DOpsXgaDjXssOUziGcLkDhU7UItgWv4boQF7PK8Pn0Iuprw/VU0SuQlzNgs3k0Je7SOARR1MVCNmYZSUJcQySscFFoYYylOmM+qjo+ryqzPJunwhfqAzTOPo+Fc6fO1CaQIC1W7EWAYPM+0mLm8xBaM8aFSilj+7Etvf6h9D7WlQGLyUc/Drzg4B/0415jWSQM6VU= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6ESuOiRAtW6dvKn2smLH2jbgimkzLio4HxOGfekDVCc7toQpcXfsXR5RU59LPNJZ/2YcrD/iG4Ai9lh0e8wyIrC30hnAe7mp5VF/DdlvUcbZ9jA3BwJwTg2wgirdZL4XCKg0jefQ97kU9vHdbcX0UtfPhwul/I7177nalnBHiEY6izA/CIB2aQa0tLK6YVbz1sL/O9A4pdWU+yPt0O8xWgG2oGFYRN84tDCRQaaeYx9V85Ad1VGHz+Na73lWuoAz8Ip4HQMjBNE71SjVWXrpIpveI3tY4z2UVhGGS+ubYx3Gswu3Z9vM/N8u+6+awMSHaOeKeoXiPWYeFMA3A/SeQwolCmZ9hINnyAdIwWqW1JakrCbsFPTQnqBoOitTZVOzkETBAx9Bm/u8YglWLzCiAh1xXi5VnRewk6FIOZx6RlhSbjuEwfYl6MLjAS/dCTFd X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IVNvVZf0QD48kEzfrUU2sibPZdZ648fmLfHzGwcTZgN4k0nK6mqTOl1jC2/S6PSoAw+Wsvk23X514BDuXEU67dQ/XBVQIqzIXDSp7vIedMfsFAKU010HPuukqJ+GyoXAPB+gaXAvdQB9BTbK0Z7HMw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cdb25f3-390c-481d-fb61-08d97ea6e862 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:17.9999 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 04/27] avformat/filmstripenc: Simplify writing reserved elements 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: Z1V1b5z1Jv2I Signed-off-by: Andreas Rheinhardt --- libavformat/filmstripenc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/filmstripenc.c b/libavformat/filmstripenc.c index 48f483bc90..ebb7294175 100644 --- a/libavformat/filmstripenc.c +++ b/libavformat/filmstripenc.c @@ -26,6 +26,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "avio_internal.h" #include "rawenc.h" #define RAND_TAG MKBETAG('R','a','n','d') @@ -43,7 +44,6 @@ static int write_trailer(AVFormatContext *s) { AVIOContext *pb = s->pb; AVStream *st = s->streams[0]; - int i; avio_wb32(pb, RAND_TAG); avio_wb32(pb, st->nb_frames); @@ -54,8 +54,7 @@ static int write_trailer(AVFormatContext *s) avio_wb16(pb, 0); // leading // TODO: should be avg_frame_rate avio_wb16(pb, st->time_base.den / st->time_base.num); - for (i = 0; i < 16; i++) - avio_w8(pb, 0x00); // reserved + ffio_fill(pb, 0x00, 16); // reserved return 0; } From patchwork Thu Sep 23 15:28: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: 30486 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp565917iob; Thu, 23 Sep 2021 08:29:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5iFsDYv1s8oANgd09jrqMQf6qcibOYfoIfmCVkOFly3AGdPYsZ0Chzp16ZKyu0f0LjhWW X-Received: by 2002:a50:d984:: with SMTP id w4mr6026261edj.375.1632410995889; Thu, 23 Sep 2021 08:29:55 -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 g6si5668779edf.632.2021.09.23.08.29.55; Thu, 23 Sep 2021 08:29:55 -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=kTpYNVSP; 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 37FF168ABB9; Thu, 23 Sep 2021 18:29:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 154E668A94E for ; Thu, 23 Sep 2021 18:29:28 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YGDky1cSNfKteys0wKGogq6xYNaadkwPY/dGBfsQtjJP8cgXXQKB2mq3QM8QwRIXlWt4dPOh9R0OPildoKBmw0Z3Ael79NVNtrswsjsLZO568I9/MUKG3LMwGIwIelGtw/MtDRqxXFr+WQUXzYgJvcSMLonM50WR2ulspyS5TPeruz4VyUqnOKDzmEwPMJky1fvBEmrfEz3MtP+eiZ2wSqw8e2ry08t1E+4aYMJgBiTMTQCGIj9vVmMon/s+65d9zSH1+In2ebCHd2q/QU/BINYIoP1l09CMC6zzWcPgn9Mmm+KGA4lAQ/KcbJbkMNL/j8f7HFtaJhugyZa4KNaFPw== 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; bh=JIJvfwH5UjDyK+cYzZGI3JHVAx7SlcC8Om4bXonEoxY=; b=kBRcC1l1xVTXcSVFFjiZwV/nWafiDFr7owYahDf0TdhyafuFdCl/GGUVgW+ns/kI8WrYb3tW07TDN+TK9ohUO7fzV+07GUrigfs+Hf/PpvDH7esIdJR00cjTnqtU1LTp+xoX6UJG4qU/Aa9R2bWn73X9CGeTGwKfKPKBdukOID5x175myUH0uwFhg7qoHk3FwJ6uMDHNNCOY8gw/wqer64IRGOt//LT40bNPXE0WS6hicVL9FbKMwXgi2LZSwrdX0292uFuNtlz8xu+XeXhY/Q4d4aFLISnMi3/NEOZzAoh0yBY1LZ0SiqCSAgSMC4vQBtJeByn97Oec0EJntqJopA== 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=JIJvfwH5UjDyK+cYzZGI3JHVAx7SlcC8Om4bXonEoxY=; b=kTpYNVSPu7dgWQzxp0ymvSqVBgb8TYDTfopaArGMDTMk3vWPK9cjFWtT/ntu2dQp+UtVI/o0RorYRFofo8xPC+ev2U4z7Dyjxc634bca9z6Br1FrYuD5p9zGSKYwOqxm56rvBLon1LPVOj/9PxnIFSqvOuRuBBUdugup6eeKHmXiSUjX0BdfooSxH/nA+mYrtrSGqI+rjmAGEbxagw62WRXCCYhs9htYp7ZI4vbZXJfyWfd4/ZQD5rDCCJdfRCbT3VSJzLra8QVMuPcDNY7zM8igWUnc7vm1GswYhtvwRCPirtJJzqiTQedofzBfDFeA5AsumAeqNWkdgljtn0RrDQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:20 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:20 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:40 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [L5rfoQnPHTlpqP3qvfZ9lza1CDMWD+c1] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5940aa0b-2091-4346-bd20-08d97ea6e9d6 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSOPkHvwUCg8doSSgVqJiTtNCQ7xr6tI4TfTqZgsjIFGH5gI9TIBUJ62zlZ2s4gqxdW/7dleGeLH8UQiqwpW/wJu20KJV9ZT5QKUathqvwdcl8k2HA1sH4aLOEdf3JMMuroQ/U5nxSTftIEcFKMVaESWZ2lucb12MkVcApO0tTng7y78rC1MpQjznMEOYXmBBymvpEcXWbYGZ0uf5R3BOfAkGBvYE93LcYlN2dxDEfs6UyE/vt+RYfBC7rU6+ZjQkFKyKZo8t3Xoz3nDs+ksUGiD5TgUueWEE08E7vLUCLlBIW/Cz9zKrIKfBlC0AVbVYxWpbEbAf2dhTsroVWGcW2/UMahzId6w2YSb2dST/Cx6h0n6yGHF+tTRDUmu5jU5w19+9cV4bPuPID22MUX4PPFTd1h6TCxeYNFc6gGJRkAKi4z/RPSW7ZFsWQyqt+svZcwI9r0bzkbFMlCTRe5OtmyuS8vVxEhZ66TsZHhkDOtkpGWIZy82VjSfNDvgekpQExgVTuDnpgWfWEKTZ3GFl61t+HcZssemoeWc9JxDVI+lM0BDE7OqTDYHqFnFmKxdBrnY0rJeUvgDgTyhVjX+Bq+W10sxh/edDaLoCAKeATjvnvB5M8XKzp2dhSfnvKx3ASAREUmUVmGDY6sW5H2i5y3u8TDzENgXEGSsn+Zl+8225olQRUGdWljswrLLwuPxxlJI88Xtjd/6J17PtM3lSEt7gjF/xje7VQAyMZ7BA4r90= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /hJ7WkoAUD5CD45S/BiWJNzeJTYjs15Hl5Gww7Ekx4fzLMKHu2oASqJARDlZ5oc/Y8aWzHLeDfbatYYyh5Y+LhnYo3UzpLO8tPh1LFnQTAfrOBRztUJWHqKb0IgbeGHy9rtYA/WO+2SYe9c164pDJmfzXnYYzzuGaK6t3okZxoIgIQQfih1H1xcBwLFswQS+kkEbfjPH+ofBeTCHhbAkPkccSkM/rXUK2ZMbi02me5YbM/ZsVBIz2Iha1LpT/bme9hyV+pCaerzDiI5MUCVa27Ahul3V0ARcsbWyf4/ZmdcrWBIUXjto8C+rDH4fDD1OzWw6DJ2sAFtsgFl3858KUYHVGWpYzztBU0LvGMEWjyoixnXUcrB9CtjOFHNGRFrhhNGn8uo/B+k/zEix/4FoZKn4q8QD7+2Oj0HNgpE1EKz5W1Y2/eZ+TpXb26ecGk/2 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3V1lnPdWQgm7R5fupXjB0ufvCyFfSJgT1LGT7cZZYnrJsw88/G543Z/IxbIUsJtExxvV8DiQ+vgzQbUpkPB5sVCpjrsCqEI30qZAvFCcFPYM60ab/XXcwd4gMN4qaa8WM1f6VjJEEABtyBWw02eyOw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5940aa0b-2091-4346-bd20-08d97ea6e9d6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:20.4731 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 05/27] avfilter/audio, video: Remove references to avfilter_unref_buffer() 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: yM6cg15ULcks Signed-off-by: Andreas Rheinhardt --- libavfilter/audio.h | 3 +-- libavfilter/video.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libavfilter/audio.h b/libavfilter/audio.h index 6bbe6ee9ef..90709a0ad0 100644 --- a/libavfilter/audio.h +++ b/libavfilter/audio.h @@ -37,8 +37,7 @@ AVFrame *ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples); * @param link the output link to the filter from which the buffer will * be requested * @param nb_samples the number of samples per channel - * @return A reference to the samples. This must be unreferenced with - * avfilter_unref_buffer when you are finished with it. + * @return on success an AVFrame owned by the caller, NULL on error */ AVFrame *ff_get_audio_buffer(AVFilterLink *link, int nb_samples); diff --git a/libavfilter/video.h b/libavfilter/video.h index 56c58d6766..f448e4ada4 100644 --- a/libavfilter/video.h +++ b/libavfilter/video.h @@ -33,8 +33,7 @@ AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h); * be requested * @param w the minimum width of the buffer to allocate * @param h the minimum height of the buffer to allocate - * @return A reference to the buffer. This must be unreferenced with - * avfilter_unref_buffer when you are finished with it. + * @return on success, an AVFrame owned by the caller, NULL on error */ AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h); From patchwork Thu Sep 23 15:28:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30493 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp566092iob; Thu, 23 Sep 2021 08:30:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD/UlEbsMnU9VIOJXP4CjXeWW5mDGTzW+iK6oj2f0Ve7ZqFQVFSQTdrAWt+ACAA2nD1DCA X-Received: by 2002:a50:da84:: with SMTP id q4mr6177034edj.1.1632411008744; Thu, 23 Sep 2021 08:30:08 -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 s11si5129549edh.30.2021.09.23.08.30.08; Thu, 23 Sep 2021 08:30:08 -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="QN/E/XK+"; 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 2BEA268AA9C; Thu, 23 Sep 2021 18:29:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 48D9D68A94E for ; Thu, 23 Sep 2021 18:29:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=myn2mkJiZ0RxZ7u6Q895QldWsnmmKyXUL45Q08/Yf37uCYpObrtbyar28HrUaahnZ/Cy0iOvSyhD2NIGIpQY580SB88I8fv8CZkFh5xyKHHtLP7OGi0w0m6/w+JMkAzKhbToUTk8MSVQFcTuXhBcfUiqgyg5vYp7MRadxTOZol/PQuS2Fn33lxFS03m9PCJK2b6x4X/ZCi2vlQmRZBY1jqu5ikI99Y64y7LkUNpSoNoZ5XM3MAa1O3b6TQ50lnAfZICXoqIHvN75Q8cd6tly2xNDDNe6MMgjRzCPz/bFxfKVgKpM1KyaTyvpY6wvsJnooTuIbIrGhTE1VfZDWZ4XSQ== 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; bh=BCCs8RcaWCpG3IwFONkbz1HNTd3hEHeoxM/9HEX0iXM=; b=RYmUCbtnQB6KTB+Pq2FlotMhqy9GMAmlMcmKO/b5e+B4dn4ABOsZrcVWpUYjb6A1ARxNbQYe2pI+6K9e9nuLTqc+SHnXS0gP7GlG4aIGhA/eW7DIeowlxQYcyMxuZPnbUWxaQwp4Z+x38OHJPkJnQjo6rN8zbeQ8dGchabilI9YeGuKKvX6xEkG1F9q+kvx4VAK6VXt4H89HTFEk9/S6GH5fhY+bNuldDmXhgyEnSRtVwlHSYOd9MvGnANOh/Q+Zfc+A3YvGvabh1Yod1fnvxH5iu8i8lcL6sVmxCHGx4OYNxjEYMeVZ4bXZxeh4D/SEG0kZotzF9SPnASEiiRvo3w== 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=BCCs8RcaWCpG3IwFONkbz1HNTd3hEHeoxM/9HEX0iXM=; b=QN/E/XK+PPXdzUBzg692LQUPXDpmCSvo2PEwiXmBnm7N2x7G3O/sd83rKFdD3e+K9PZWxL+fCxL1+Yqgky9/k7Z5rK7J1jtLguedfhH9M8WzyhQeUlB9yBPx2cK86e/BMN9Wlpbe97veL7pjCsgCT+LDuvPHug9s6bIo7sp1EktV5iXmJCqRD0Pb24EM0vxnvYl40L7SYZhP2dL2bQH+xcfST7Pn6uxc9z0kvc4RoKwzHan0SKQLFtAbfTJ1QD2Ej1kIOq4c54J09zrsMYUMYDnrjgDrTAikRInknD8vhgCSCgoa+QW+Gzt4WGsUCjU0X7cwTVpzqpX9Ntbhlxiu0g== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:22 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:22 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:41 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [07YR7C2Ih70iYzhldX9mUACDKPTY0xZj] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87e94b11-ed5f-431a-6e90-08d97ea6eb49 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWt8qMG3IjM1pM+gnFiFAdPqGnYvdmXqHWPMBMm5yeeCr7TBWr3+Tfn7mhhuG7L5SyDPvIsymbps1gY1CQuPVtWRjpNFc+nbo7cba5swWoD9JHpmyHov+llvpz5wrI0+efe4kAu9sfnxi//jOgsuLk8DlWlzKz/DMdTZtbm4gGcwODkYNbdboxdoB4R0Dm19x7421+SA4BqFnDHv7UxkDGA+nHhFMW3xc4FxZielRInGpYfulAvP1GtIAtVUoTFMN1SbxLf/8hh2f+fqgBFxYLLhtw2uUpOTZxzg7flHtUWylQyVeYyOYyhLXXgdYLm+lUcG17wD7Gi8dgI76XL9vfaXZEFC6Xdd3uH2zmQCa6tDE30i1jz5m3jNWPQv7aFN2NDWP4qvz5KN0Yz/F4dEfzMWClVNwQuZP6hjyCKe8Djwb7HvIm8F5pAiHYFgYcPOKHtUVtSP92Fw5DJWCPQP6iU7GOggvr0j835YvqC0CZrm948eivzO6cTMGSjDhbFuYSNaxVkNQQWzQckPeH+74z1yXnV8qfUW4ricAWyPjRDaafk7qeNYv6zbdELaQU0/O3v0pKD9spHW5XvuVZOcOPbT1wIWEGObA1AQ9fPJ3GahauxpPFPOAHS8SoCpHu9EOgScl8g5lKYVf3/U8bpmktM5Se6QrvS/Lt9VPjZFbQV4M0bGPCVkf8/8XMwdRVAg2o6q9qK/2QvZa2O21DnGTRdr2mhg70ie9w= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fTIEyQnZfGoWkCAiEsatYKUKMbUPCHMiEtF9ujsrQDp1Yp1D6pcKh3P3+lu/0JBhiW8UgKiFNKd/Egb83z5FOYDikwVl+Wxd7MnGe7Lf84/PTJ0Fe8J15jSAe3l2G/pRuMjelF9cxt9aBSCpwvPsXTW+Udf3skoDB206dpd+OCHa7RV2rtvsP31NApE/9+MKORfAnuXly8bDPx9sIcHgifLfxEw6rR2v8l3133xJfkb698pBU2+7DVGkKe36ltXv+5Cxwesp05wontxWeHIHTWarpPYuFpKX3Ovmwbr4+uY8BrzybnRsB3tVbyo4JYmxNO/h6uyOq0KLEThHwUVdOgdxuJDUGMiJMbwoagJYTpX7lfteGWE/8RPeNmODMF5QJ5qudKbXI7Ckr+A48mZ4GLi2rrDOhfcD6q4/6MU8e0kmgCMBoB/hCXeV/oiR98s6 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lpEW68UNFhb3mLVKFhDpE3gJfLcsll6/XZQFD3OgXLWJhhIWGXK6fcykIVHWNyyEVrGMAQ9wOzl3MZsFXAKdXrbaj9VoI/+RyBl2NRw6sk/IGgnjXZZcjSdP9w+rYCBynHzwaebyVAkMXWz3SEW3jQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87e94b11-ed5f-431a-6e90-08d97ea6eb49 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:22.8776 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 06/27] fate/demux: Move caf test to its own file 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: FKkV7SONpkWO Signed-off-by: Andreas Rheinhardt --- tests/Makefile | 1 + tests/fate/caf.mak | 5 +++++ tests/fate/demux.mak | 3 --- tests/ref/fate/{caf => caf-demux} | 0 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 tests/fate/caf.mak rename tests/ref/fate/{caf => caf-demux} (100%) diff --git a/tests/Makefile b/tests/Makefile index e42e66d81b..d5595908b8 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -121,6 +121,7 @@ include $(SRC_PATH)/tests/fate/atrac.mak include $(SRC_PATH)/tests/fate/audio.mak include $(SRC_PATH)/tests/fate/bmp.mak include $(SRC_PATH)/tests/fate/build.mak +include $(SRC_PATH)/tests/fate/caf.mak include $(SRC_PATH)/tests/fate/canopus.mak include $(SRC_PATH)/tests/fate/cbs.mak include $(SRC_PATH)/tests/fate/cdxl.mak diff --git a/tests/fate/caf.mak b/tests/fate/caf.mak new file mode 100644 index 0000000000..e921fcc297 --- /dev/null +++ b/tests/fate/caf.mak @@ -0,0 +1,5 @@ +FATE_CAF_FFMPEG-$(call ALLYES, CAF_DEMUXER CRC_MUXER) += fate-caf-demux +fate-caf-demux: CMD = crc -i $(TARGET_SAMPLES)/caf/caf-pcm16.caf -c copy + +FATE_SAMPLES_FFMPEG += $(FATE_CAF_FFMPEG-yes) +fate-caf: $(FATE_CAF_FFMPEG-yes) diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak index 6ddbbcbd4d..20aa90427b 100644 --- a/tests/fate/demux.mak +++ b/tests/fate/demux.mak @@ -29,9 +29,6 @@ fate-bcstm: CMD = crc -i $(TARGET_SAMPLES)/bfstm/loz-mm-mikau.bcstm -c:a copy FATE_SAMPLES_DEMUX-$(CONFIG_BRSTM_DEMUXER) += fate-brstm fate-brstm: CMD = crc -i $(TARGET_SAMPLES)/brstm/lozswd_partial.brstm -c:a copy -FATE_SAMPLES_DEMUX-$(CONFIG_CAF_DEMUXER) += fate-caf -fate-caf: CMD = crc -i $(TARGET_SAMPLES)/caf/caf-pcm16.caf -c copy - FATE_SAMPLES_DEMUX-$(CONFIG_CDXL_DEMUXER) += fate-cdxl-demux fate-cdxl-demux: CMD = framecrc -i $(TARGET_SAMPLES)/cdxl/mirage.cdxl -c:v copy -c:a copy diff --git a/tests/ref/fate/caf b/tests/ref/fate/caf-demux similarity index 100% rename from tests/ref/fate/caf rename to tests/ref/fate/caf-demux From patchwork Thu Sep 23 15:28:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30496 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp566276iob; Thu, 23 Sep 2021 08:30:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWrw/QcATDP1/aL/uhJKGrB6PQ7dzRU4EgEk0lDbl9Z0bWmmOv8S2H0JNcA/XOdjsLarD0 X-Received: by 2002:a17:907:d0c:: with SMTP id gn12mr5368856ejc.359.1632411020462; Thu, 23 Sep 2021 08:30:20 -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 z39si6105510ede.176.2021.09.23.08.30.20; Thu, 23 Sep 2021 08:30:20 -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=Vmx29ZAf; 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 3B76468AAD5; Thu, 23 Sep 2021 18:29:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6F7F168AA9C for ; Thu, 23 Sep 2021 18:29:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DX/EvFhjMsZ1GA8+h+1u+mB5kBOSip58Cy0MjozS1ej4N/+uQL+IXBvzazEv2Iuti1JoIqpb9aFFBoAhXoAWleK3IPMlSsPM4NAHWeZXCz15YVDmONnzI6z+53sHahOLCYlDdtiLZ0goUClhnSik9BdHxtpLoNNu5BkXB0/EEFXVYc3nUSjpbeTkhzjXq57Z2gVbc72xgQQKahDgBTh2qdKSQUg8eIZJumFQ5k3CcCURpoTT3xJYHNMbTKe8OCTAucNo+v4slfZrIXVRF0k5SomKWpPFZUyEKKlS3DhoRdAXRuYYasvwB2t78/L+CJrehfXhJEUkZbbp0PtgIMBZeQ== 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; bh=9rJd4U+TKEHXm6i85vWmbf7QpDurBpVE1mPfu38xALo=; b=DjUhTbSLIrhyUYRKUBzjMxHVzPn+tq1NljjHwT77PdjAVQ9t+xKc43NXwbKTL0cUp6ss39VHdlQdPydy+whovJl3TKhVSqAi4be/HRiIphkl6jRvDifu4pz4RAe0PDpmIqWj7YX7Fhptv/DbUEUaydT55dIVXqLhPbJHxE/uoOykoV+KTgPLFjgTNZJ4gv3vtMrgiTi+Yp2eUNq0U4RVB2ZtMZ7J679ywGcONrDRZB2ZdqhzNfui0qO96ghB303NyNe1aXVuXRWuPnrAbH6PLxFhg/UF2B+FhL78svPGaBvJreZBTyzHYitYD9pFHnDvdnxNOi1gMmzqL4Pj+VdXxA== 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=9rJd4U+TKEHXm6i85vWmbf7QpDurBpVE1mPfu38xALo=; b=Vmx29ZAfIxGO3Zdjmrlr/rg/R+GzTNAK5zP3JS2oKJ7Bas+S6U7N3IAPC6pfytTV9vlHcwS4pnJHEFV7WJ3KnWcrLA3zSF6hqXoZTIBTdZKZPI/bdRPD0s3mtIWlhyBPS6G3FTWujHCw5Y6tVl6vQfljMXbYUw7lUjZAe+mNN1kmERXY1w8sAreCxmkv/LH1bpgYrhHvvsB8vf9CbwCyd310ME/bhZl+MwvbVeFbD3+PZyClvXNudcWPyO1+ZYe4wUMEhI96iQM5dD8cqzJv/GtQlDomZyxf/3ev3T5r/9cUhaVUQEKs2/eQ3xhzg3X8670VfFXsEVLhYOyNFigF8Q== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:25 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:25 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:42 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [Yk48Zg1M0f/9e7mHtSPuonW3C5j0k9UB] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d0281a76-b428-4ed8-c9d7-08d97ea6ec8d X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEuTuEwJgNAue2qaIzKlm5zwUPqQAVh1A6HqbOSV4X0sUVNExgSbv0H1XleZdtyaQcV4qEjneD29AahTpe3a37Ytgv37ZnXplSfuHyPwlDIwGigz6HeGFr4Isg6Ezlrrak9UUeYgNdftaOlsGDFYgk0+rZ7kkdVRWf5RoXnlrga/kAAk9f1i9gPwxaLg4nIcx1h1DBspDcgPsSsYt6hQw16qPOveTDV1+ebCtFOpduf+EJRnWIN4Jodfa+hPoKxxFxekJgOYzYA1JpAGmPlqiMHqxSgbBJ0Eg17un+kedXki4y5aRtUuFjrUAMkuI8PMqJceP72W4WIlJnb1Kdp8Sf5MizH6JaAXz3Sx25I++xYxM6d1HpKmzPqqOMzNCCjg5luDk9me35fdB+/QDx+ygN7fuNu8z0dlYnUIV+gK4YLE3hboIXb0GaqZ2j2+0UvLymMvOfAhdUj6O7DX4cvzF5szYjG6r2nbiRwroQpIrvILH3XBMhIDR/zulMSOMh+tt+Whpi2k4p++MlI/1MVi/As+KEy88vl6izzZ630bnEN/kbgXHhVqpLO+ddU1xFPhiiyoEscwE8hJDpp5TqXH/ilDquwrhgOCNUE1BY66QVHvvt+QfcMornDbmvSeaqNK+hhIoIieK8OwsqUUKcKBtu4hKW7RD8IXPvQSgcH33Pmg1XJW+yKraOhmpNbB68bNnfHJl0TpiDhhmLmjRJx5H1XGTckd3FBTrNg1ZiAK9Mg67pr+tJSoerwJ092MXRyzU37RH8LcIwIhusTKXOXsiV98 X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TauNjKlaFlCDoqzffkXiMkyiltCd77aFD+YJX35zzRHyShW3ga9CpEBK9wd4L3AUJcoxMSyEfzV4TTRlVoZunYmcbzElJj4tC4TJSgUm8vAjsdzZ40es8FCGxiSbAuiP1AN5amTBuxc4Mr+uAB/3RtpGY+5Kw1cZCQUGwgyHiGJs3uQbzbqbUrDXZKdV7Fl9U/vLw9lYbVKInCF01ODoZt00joXL0pgalVPbQWH2StBS1Ot4YAF66HJX/MQtbcsx5ovMmm854+ASI6euE7cKZovrJDPIxKoHyZY3x+jU9r+iq4FMXasOLG0uGrfFKJgQgHE8ioJwods2g2ykBrZl7MaXZ8JRAhdgfq2x4rpArJS89rYefRQAc2Lm2j32YchJLsSF8/HGLo3QMvhcjZP0U/aYzZw2Jx3dkWJlwLRWV3jfeB2Nm2mHvAmU3nr01sUN X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zAdHKORUm6uEZ/YeXBJ8hVCHlpCf3XH3gMfyQWEUeFX/As1tUo2uH7UAAyQ34cqd3Boy4s5adaQfsIDGL9Sr2CG8NHZw+Zta3XApLHp66Nkp6S5AEh6HboA+2JkJqo4B/HfR07mfqeiQeqkbqQYqPg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0281a76-b428-4ed8-c9d7-08d97ea6ec8d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:25.0172 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 07/27] fate/caf: Add remux tests 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: Z+9nzsa2utki These test both the muxer as well as the demuxer. Signed-off-by: Andreas Rheinhardt --- tests/fate/caf.mak | 30 +++++++++++++++++++++++++++++- tests/ref/fate/caf-alac-remux | 28 ++++++++++++++++++++++++++++ tests/ref/fate/caf-amr_nb-remux | 19 +++++++++++++++++++ tests/ref/fate/caf-mace6-remux | 20 ++++++++++++++++++++ tests/ref/fate/caf-pcm_s24-remux | 23 +++++++++++++++++++++++ tests/ref/fate/caf-pcm_s24le-remux | 23 +++++++++++++++++++++++ tests/ref/fate/caf-qdm2-remux | 12 ++++++++++++ 7 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/caf-alac-remux create mode 100644 tests/ref/fate/caf-amr_nb-remux create mode 100644 tests/ref/fate/caf-mace6-remux create mode 100644 tests/ref/fate/caf-pcm_s24-remux create mode 100644 tests/ref/fate/caf-pcm_s24le-remux create mode 100644 tests/ref/fate/caf-qdm2-remux diff --git a/tests/fate/caf.mak b/tests/fate/caf.mak index e921fcc297..581128c670 100644 --- a/tests/fate/caf.mak +++ b/tests/fate/caf.mak @@ -1,5 +1,33 @@ FATE_CAF_FFMPEG-$(call ALLYES, CAF_DEMUXER CRC_MUXER) += fate-caf-demux fate-caf-demux: CMD = crc -i $(TARGET_SAMPLES)/caf/caf-pcm16.caf -c copy +FATE_CAF_REMUX_FFPROBE-$(CONFIG_MOV_DEMUXER) += fate-caf-alac-remux +fate-caf-alac-remux: CMD = transcode m4a $(TARGET_SAMPLES)/lossless-audio/inside.m4a caf "-map 0:a -c copy" "-c copy -t 0.2" "" "-show_entries format_tags" + +FATE_CAF_REMUX-$(CONFIG_AMR_DEMUXER) += fate-caf-amr_nb-remux +fate-caf-amr_nb-remux: CMD = transcode amr $(TARGET_SAMPLES)/amrnb/4.75k.amr caf "-c copy" "-c copy -t 0.2" + +FATE_CAF_REMUX-$(CONFIG_MOV_DEMUXER) += fate-caf-qdm2-remux +fate-caf-qdm2-remux: CMD = transcode mov $(TARGET_SAMPLES)/qt-surge-suite/surge-2-16-B-QDM2.mov caf "-c copy" "-c copy -t 0.2" + +FATE_CAF_REMUX-$(CONFIG_WAV_DEMUXER) += fate-caf-pcm_s24le-remux +fate-caf-pcm_s24le-remux: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav caf "-c copy" "-c copy -t 0.05" + +FATE_CAF_REMUX-$(call ALLYES, WAV_DEMUXER PCM_S24LE_DECODER \ + PCM_S24BE_ENCODER) \ + += fate-caf-pcm_s24-remux +fate-caf-pcm_s24-remux: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav caf "-c pcm_s24be" "-c copy -t 0.05" + +FATE_CAF_REMUX-$(CONFIG_MOV_DEMUXER) += fate-caf-mace6-remux +fate-caf-mace6-remux: CMD = transcode mov $(TARGET_SAMPLES)/qtrle/Animation-16Greys.mov caf "-map 0:a -c copy" "-c copy -t 0.003" + +FATE_CAF_FFMPEG-$(call ALLYES, FILE_PROTOCOL CAF_MUXER CAF_DEMUXER \ + FRAMECRC_MUXER PIPE_PROTOCOL) \ + += $(FATE_CAF_REMUX-yes) +FATE_CAF_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL CAF_MUXER \ + CAF_DEMUXER FRAMECRC_MUXER \ + PIPE_PROTOCOL) \ + += $(FATE_CAF_REMUX_FFPROBE-yes) FATE_SAMPLES_FFMPEG += $(FATE_CAF_FFMPEG-yes) -fate-caf: $(FATE_CAF_FFMPEG-yes) +FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_CAF_FFMPEG_FFPROBE-yes) +fate-caf: $(FATE_CAF_FFMPEG-yes) $(FATE_CAF_FFMPEG_FFPROBE-yes) diff --git a/tests/ref/fate/caf-alac-remux b/tests/ref/fate/caf-alac-remux new file mode 100644 index 0000000000..5c1b2d1eee --- /dev/null +++ b/tests/ref/fate/caf-alac-remux @@ -0,0 +1,28 @@ +e0a94c78e9680398adce2ac72d682f48 *tests/data/fate/caf-alac-remux.caf +1292701 tests/data/fate/caf-alac-remux.caf +#extradata 0: 36, 0x562b05d8 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: alac +#sample_rate 0: 44100 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 0, 32, 0xa0af0dfe +0, 4096, 4096, 0, 6701, 0xa9ddc14e +0, 8192, 8192, 0, 6639, 0x3ccda8d6 +[FORMAT] +TAG:major_brand=M4A +TAG:minor_version=0 +TAG:compatible_brands=M4A mp42isom +TAG:disc=1 +TAG:title=Inside +TAG:compilation=1 +TAG:gapless_playback=0 +TAG:track=5/13 +TAG:Encoding Params=vers +TAG:iTunNORM= 000004DF 000004C2 00001E64 00001AB3 00000FB9 00000FB9 00006480 00006480 00000FB9 00000B52 +TAG:artist=Maxwell Strait +TAG:album_artist=Maxwell Strait +TAG:album=OpenMusic +TAG:genre=Rock +[/FORMAT] diff --git a/tests/ref/fate/caf-amr_nb-remux b/tests/ref/fate/caf-amr_nb-remux new file mode 100644 index 0000000000..0eed36a5cb --- /dev/null +++ b/tests/ref/fate/caf-amr_nb-remux @@ -0,0 +1,19 @@ +a00bd18f70b66286e67d84f0df034a48 *tests/data/fate/caf-amr_nb-remux.caf +4145 tests/data/fate/caf-amr_nb-remux.caf +#extradata 0: 29, 0x6b3407d3 +#tb 0: 1/8000 +#media_type 0: audio +#codec_id 0: amr_nb +#sample_rate 0: 8000 +#channel_layout 0: 4 +#channel_layout_name 0: mono +0, 0, 0, 160, 13, 0x2bf906f6 +0, 160, 160, 160, 13, 0x28bd0756 +0, 320, 320, 160, 13, 0x2b2706f7 +0, 480, 480, 160, 13, 0x370d0858 +0, 640, 640, 160, 13, 0x148a02de +0, 800, 800, 160, 13, 0x201104b7 +0, 960, 960, 160, 13, 0x2e690704 +0, 1120, 1120, 160, 13, 0x2f640726 +0, 1280, 1280, 160, 13, 0x31af0767 +0, 1440, 1440, 160, 13, 0x273a060f diff --git a/tests/ref/fate/caf-mace6-remux b/tests/ref/fate/caf-mace6-remux new file mode 100644 index 0000000000..3a0499d793 --- /dev/null +++ b/tests/ref/fate/caf-mace6-remux @@ -0,0 +1,20 @@ +23cdb127d4a7ab912611c2eb20909840 *tests/data/fate/caf-mace6-remux.caf +11483 tests/data/fate/caf-mace6-remux.caf +#tb 0: 1/22050 +#media_type 0: audio +#codec_id 0: mace6 +#sample_rate 0: 22050 +#channel_layout 0: 4 +#channel_layout_name 0: mono +0, 0, 0, 6, 1, 0x00900090 +0, 6, 6, 6, 1, 0x00870087 +0, 12, 12, 6, 1, 0x00ff00ff +0, 18, 18, 6, 1, 0x00ff00ff +0, 24, 24, 6, 1, 0x00ff00ff +0, 30, 30, 6, 1, 0x00f800f8 +0, 36, 36, 6, 1, 0x00fe00fe +0, 42, 42, 6, 1, 0x00d800d8 +0, 48, 48, 6, 1, 0x00f800f8 +0, 54, 54, 6, 1, 0x00fe00fe +0, 60, 60, 6, 1, 0x00fe00fe +0, 66, 66, 6, 1, 0x00df00df diff --git a/tests/ref/fate/caf-pcm_s24-remux b/tests/ref/fate/caf-pcm_s24-remux new file mode 100644 index 0000000000..bb3136ef7d --- /dev/null +++ b/tests/ref/fate/caf-pcm_s24-remux @@ -0,0 +1,23 @@ +d696d9dc23a82c51c4761f5792e7fa37 *tests/data/fate/caf-pcm_s24-remux.caf +11520092 tests/data/fate/caf-pcm_s24-remux.caf +#tb 0: 1/192000 +#media_type 0: audio +#codec_id 0: pcm_s24be +#sample_rate 0: 192000 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 682, 4092, 0x71f10ea0 +0, 682, 682, 682, 4092, 0x51852317 +0, 1364, 1364, 682, 4092, 0xc8e2693d +0, 2046, 2046, 682, 4092, 0x8df13008 +0, 2728, 2728, 682, 4092, 0xc56bdf7f +0, 3410, 3410, 682, 4092, 0x4ac2c0f9 +0, 4092, 4092, 682, 4092, 0x11a50650 +0, 4774, 4774, 682, 4092, 0x0a3837f4 +0, 5456, 5456, 682, 4092, 0xff0a3ce7 +0, 6138, 6138, 682, 4092, 0x42d2c983 +0, 6820, 6820, 682, 4092, 0x2adbf4ea +0, 7502, 7502, 682, 4092, 0x86d4f0a5 +0, 8184, 8184, 682, 4092, 0x5f35d5f7 +0, 8866, 8866, 682, 4092, 0xd3f27234 +0, 9548, 9548, 682, 4092, 0xb3a97ff5 diff --git a/tests/ref/fate/caf-pcm_s24le-remux b/tests/ref/fate/caf-pcm_s24le-remux new file mode 100644 index 0000000000..9520e423cd --- /dev/null +++ b/tests/ref/fate/caf-pcm_s24le-remux @@ -0,0 +1,23 @@ +ee0072a92044cbad68795cf93546c517 *tests/data/fate/caf-pcm_s24le-remux.caf +11520092 tests/data/fate/caf-pcm_s24le-remux.caf +#tb 0: 1/192000 +#media_type 0: audio +#codec_id 0: pcm_s24le +#sample_rate 0: 192000 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 682, 4092, 0xa6320ea0 +0, 682, 682, 682, 4092, 0x27732317 +0, 1364, 1364, 682, 4092, 0x5899693d +0, 2046, 2046, 682, 4092, 0x6fa63008 +0, 2728, 2728, 682, 4092, 0x22b0df7f +0, 3410, 3410, 682, 4092, 0x5512c0f9 +0, 4092, 4092, 682, 4092, 0x11b90650 +0, 4774, 4774, 682, 4092, 0x9cb537f4 +0, 5456, 5456, 682, 4092, 0x7d1a3ce7 +0, 6138, 6138, 682, 4092, 0x0f56c983 +0, 6820, 6820, 682, 4092, 0x386bf4ea +0, 7502, 7502, 682, 4092, 0x5924f0a5 +0, 8184, 8184, 682, 4092, 0x565fd5f7 +0, 8866, 8866, 682, 4092, 0x4d197234 +0, 9548, 9548, 682, 4092, 0x61e67ff5 diff --git a/tests/ref/fate/caf-qdm2-remux b/tests/ref/fate/caf-qdm2-remux new file mode 100644 index 0000000000..a3bde1264b --- /dev/null +++ b/tests/ref/fate/caf-qdm2-remux @@ -0,0 +1,12 @@ +2b71d78aa6c9d13a3c0dbbbebe885227 *tests/data/fate/caf-qdm2-remux.caf +51228 tests/data/fate/caf-qdm2-remux.caf +#extradata 0: 64, 0x10d20603 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: qdm2 +#sample_rate 0: 44100 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 0, 370, 0x4d1897fc +0, 4096, 4096, 0, 370, 0xea999da0 +0, 8192, 8192, 0, 370, 0xca259462 From patchwork Thu Sep 23 15:28:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30503 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp566500iob; Thu, 23 Sep 2021 08:30:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjBe5R9rN2LavPEboo6VlYB4e6/goTL2eqdg8kjeq1dSbCL4l3vcq6gbEhiLisXyUI2moX X-Received: by 2002:a17:906:9801:: with SMTP id lm1mr5606060ejb.432.1632411033663; Thu, 23 Sep 2021 08:30:33 -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 jr21si5983066ejb.14.2021.09.23.08.30.32; Thu, 23 Sep 2021 08:30:33 -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=ZBPUtvIv; 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 19BB168AC3A; Thu, 23 Sep 2021 18:29:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 985C868A94E for ; Thu, 23 Sep 2021 18:29:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cQll1ClIe7YSCSXFtzw6cA1EkmXl9Ij7Xrs8Ghxsn2sfBACksamwQAtue8v7GVgxkPCC8LnLTwiUJrPr4Xert77M7pO8qng+Q7TObUn7nkZ+QJW/mGGoQ5rUVNr5kNg2lLyLhhaRcUTxgNdZWSCPWqvZJhyVhU22NGbPA36UtEBdGdKwkHicx9r5x6yaTtaD3Rc5EOdRvg4Sm49TZovM8ekha7rQjTmIjmVLmnRqsv/7R8vOh0cQN3GaCVzxiS83qzCY2OD21ZLgkMoziJ0hMLoo9zas/nrk9WRwQoz/C6YP9oOn2ABevPH0FWhGAeu6UqhBXguDlU9teaEPw39L0Q== 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; bh=2Tmmi3KV1P0/updB83vKKtTfP2pGCLQX/XwsA8gNd8E=; b=in40kk/Em0QKJjzd1RekglUKgTSANMgKeeTFF8drYK4WaAx/WXq0wkji0hwX3t7Wwz382cic8dZeFLz78mDQ9qrnEpPAUa/VmyVthRJ26RzmutmOu1ZX6/Ij88eUyrhbyIgx66khCbn4cc/2C+t9juHL5kxvqIDfdl1+QCNLC4GWZIxiXFrFXuGlLjN8HvZnEHP055TFAwUwU6qOUPGNxGZoza6ShYBZSXUoCGGrNeHrv1CFCUb4WblcXw0+TllQll4zdYABp2/3P1o9wa4V0RvK/Q8v5/uALXEe2vOyapsf9X0WS2BXtiSN8WmfOjQpbBl2rKEemzCcrBfnXHHkBw== 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=2Tmmi3KV1P0/updB83vKKtTfP2pGCLQX/XwsA8gNd8E=; b=ZBPUtvIvTCtM1KDSve/uOi7ZMbkgZW5SmTt/ncsr2NoLPX3lk8XL6Vpc3iQE2mPkr3xLcHx0Oj5SSeMYl5i3m0rJbA4r3Cg5v/dVTRnBPhCjYgBHZuLC7pddD6bNsvwB24TPOoBNCRjUu+KgiQhVm7cfcHeZzqNvk8Q+eAwU0HfIHGoI7ryIyJmH+Nf3EB2s8D61LmopAdyYUpFZy3h7z7kjNBTEcq3p7SCmz69qYRy2FA59mA2ZRfJhKOXtixcH3/JhFn0Hv+joPS8xEehkdCTwtUNA/50NH3ipz2xfiKt4Tb7eYjokrSNpHoQQUnrEgaWtoR5J1puvJ2bfgkqRCA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:26 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:26 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:43 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [C/2+P+jVfRRRTF1/CxxdLM06Ie9TMBtZ] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87f9a704-957c-4da1-2d7a-08d97ea6edb1 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWt8qMG3IjM1pM+gnFiFAdPc9+bUUgOfICrF1lDhwAOJcdMfeA1M6fmyOMZ0nOqMJccmK7xCvKPFClXWP+V46QDjT0n8K+z3+JHalmy5MisXsVzuTODFCike8sIIrgCsivVcTRiSkLjW5aIdXjEd9OQ/cdsCh7FZJF7cPPrWRMvZktNVlCj/U0ZsuIVb/Ft1ANgqCCo9ANYQIxggyqRu8ePKJ+KRXwHesGuPVYd+g7zCXR0SfOH5ZcnUCFhEr9H4YH1X/yf9PW27A7Y8Zm46mUeX3HoWM43JDeMZz4m28Dd6zguufBWZbE5BVhVjn4Zoe8hJW2GEeD4MGD+OrfoBSvyAi+MJ3NdRfGUPYXbwFN49bn0MHLXq0cJiDPSYJr4F98/74mYhaOh80jsEPgBxFMMmRXmlHiPjVUbLEksoKJyGIx1omBdrVAY2b3hiA8TG5vK5BDR7W2BoHJGLpI6yS7PTiJlp2a6Ihp44uff7l9J1FXhlGnXme0hz61e9a2l3I2s8/pWGbVjLAYU55oko98ikrKsbf5HNYB6moLQKcldukqx7fSOs8DO8rZrNFGesYNzBEQEg0W0RZwc/Rx19rPOBOWzBMh4GwhSiRcTo+K3PoSaRLuDCT5Naj1qWoqmLqHguUd7XWxVVa06GGHSeK9ybbuoJqCpa+p7lY/HF+9fTO7f3bUZ6SpR364aTwRgwZpVxNxVx0zhl+K2GjHrPe+TO6E0S2WhP1g= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yUxprw+jCkWmx/i1mODT8O0cVjQ3own8jhCuSFAOaxJDw2HYz+iR50SKlALveekqA09RVk8uZEz7AOSePvn8JToSQIV/fnSkLzmInQLRwYk0HIndoya2O6aVOXJ1mbRGSUAyVi6qN3STd9P7SZO7P/bzR39gwy0jrJ0aeA4YOZfc0Kqb6pE2o1lWc3hMT2jx6Oy118+EiPvHZSfONWMqFseJ90lM0EANlYOvWDNofb4+OZXAXlD3O2KajyRoe1bGCbPyvyyu3mL8pX7yawCSSULEX7T5JSSfJ4V/NmXlZ8HB+Glhvu1tpsU1fQ09jfZ/heMk5MYTLpG5uH0lMNjJ4v67Tjndp4wZsxaac+IvsdmZAUXc1eX08u5Lro6dBipvzakkPpAg5O4zpwbUxxQf0/VVvOBt9Pj76vXyFkeVymQNMg9o0pfxp1+VmY1tOMGk X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vqqSporDTn0tfZxrIf3+rUaEpSFBmM3mTuLdqREwyjfvFLZLGBKSoJe2prFEdOTyky+OiWczehVMxXCAQYr1Muz5qNvGIYumdmUwj7siZ5xsDeVB0Ax7u1kLt5IkT5f5ho6HR+KYGypEdNx0+b2ZxQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87f9a704-957c-4da1-2d7a-08d97ea6edb1 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:26.9109 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 08/27] avformat/cafenc: Fix potential integer overflow 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: B/YZXIGOMt2J (As long as avio_write() only accepts an int, it makes no sense to try to support sizes that don't fit into an int.) Signed-off-by: Andreas Rheinhardt --- libavformat/cafenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c index 816e978945..622ae14264 100644 --- a/libavformat/cafenc.c +++ b/libavformat/cafenc.c @@ -213,7 +213,7 @@ static int caf_write_packet(AVFormatContext *s, AVPacket *pkt) avio_write(s->pb, pkt->data, pkt->size); if (!s->streams[0]->codecpar->block_align) { void *pkt_sizes = caf->pkt_sizes; - int i, alloc_size = caf->size_entries_used + 5; + int i, alloc_size = caf->size_entries_used + 5U; if (alloc_size < 0) { caf->pkt_sizes = NULL; } else { @@ -257,7 +257,7 @@ static int caf_write_trailer(AVFormatContext *s) } avio_seek(pb, file_size, SEEK_SET); ffio_wfourcc(pb, "pakt"); - avio_wb64(pb, caf->size_entries_used + 24); + avio_wb64(pb, caf->size_entries_used + 24U); avio_wb64(pb, caf->packets); ///< mNumberPackets avio_wb64(pb, caf->packets * packet_size); ///< mNumberValidFrames avio_wb32(pb, 0); ///< mPrimingFrames From patchwork Thu Sep 23 15:28:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30502 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp566737iob; Thu, 23 Sep 2021 08:30:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGpPs/rrXe9TcmquUds3KRf9H9iGz6fn4r/K8+uVbNRYWyyytl07MRZVwbgZ4NeqxK+c8z X-Received: by 2002:a50:e142:: with SMTP id i2mr6072749edl.107.1632411046639; Thu, 23 Sep 2021 08:30:46 -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 c15si6572774ejz.158.2021.09.23.08.30.45; Thu, 23 Sep 2021 08:30:46 -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=bjCDLQn7; 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 F382E68ACAB; Thu, 23 Sep 2021 18:29:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BED0B68AA9C for ; Thu, 23 Sep 2021 18:29:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ewL8hm/hK3BHYUSuxyeXym7G2RxyNS0Yue7ZDvdxqtkv1j8C8bWRHjIg4d2VVDW26CoovK9NEWtEl/FbwhZ/DdO/435bk33VQPaGT9wTvMfrx+4q9AKZp7bsr+lHHPqjCNBVJJyXVcKhcJp1TL1WMn4F06vaUnbMX/hL+IresTCKWQ6EtF2bAORwcc3IByJN1c4GcjJ88kPudLtUI1coQ3rteDoDBfG4tnfT8S/jriUCzh8wOiD5db/DMS406Sz0Ict4o0ZXsDWoZsdoX97+3OxLO/UUnV1PSeGgVZSIF3Y6+jxKOzEti7rahZP1Ogb2kec0cZMUlhI2AE7UGi9lxg== 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; bh=9O7DdSBu3Kuue6zrs9lL7aiy1oAS4Tfl1CS6uUgfG8A=; b=JWFJKSmQEnuvg+WxgSOdwqUAR2CeAgEQQRbOKaN/w4xaacU8BDOhv27UB8n7/NXI1bjKFH2NS5EW/i2BYgXsY9ouhcrZzSVMMzJq/aiHYk8lHB+0AEdA6FOOuuotj0Xmxe/GXvx4njiip/9zsNOg5pwenC53Pg1hFA8VnjHNhe83kDYZ4//wRztW7vuGhg4k/4ryy1zjZwoABjEWT/wB0djBbwhEixCfj/LiztWeWh+OxJ0M0PsYpCA1Xgl2d/HdHroN/1yn9XN6qnWMJSN2RwIXIAy2JaAxI5kwBUoMx74pvZ9QC6xdTPvC5MBxryxOPpszpghoF+y3aV2yCJ20Ug== 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=9O7DdSBu3Kuue6zrs9lL7aiy1oAS4Tfl1CS6uUgfG8A=; b=bjCDLQn77UoQxG7IBvAuKOx/Gvvaigi/N7aOqY++gm8nZsXSWScz+VzmQZo/mKKR/lMjLCoIzrD9Gs1UENaj5snQCtynDfga0Um4a1M5rGQ8/rYYsQy2WEOYMR5o2cYSWT00+y2/xBmT1xB/duLjRGXNwcbNaozhcJpzEWwEi59F+M8rzadZwi/dMN0kuT7JpFKjhfaM/OWSvIhCYOwaXtLfOOYpG1qqOencxAeM7b21JECNLqpBGO7/OeETS0FqqeK+de35fHg3jQCV4br/AUE2TqTCIcGCLrxqexbcJrmb7o9DwHI/2ciKGWoKHlw9oPfdXio8PBNHgq1EwJKR+w== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:29 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:29 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:44 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [WgiOEKor6Ii4u9/7pru1b2DxErAI7NBy] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e34a908a-6919-4928-bd77-08d97ea6ef09 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSMz5jjWryRmWzfvsBvtOZv2vCa0jW34pIppESB0QuKZ9OxmN13XewU2w+tCYNb8SJRmfK73IXQIV5g7o/35sAPfwts3JgwKqfJreKKTx/SVew/2QvA9skU9m4Yghpsn7BQouff4rvQ6MUZrjn/EF0cmR2zxMIFfQO9OAQZ4NXOETYABDOjWACD7SsZ4q9C0WMQ7QM+DouGEOO7RMJUfpBYWEeXD8voJOVRdjW/KyKX246F/INumPZAcjps2fibcuzNgGUP1RCPN2kAef/jbPkI/trOs2uXsOszVOyhSa/jBBnm+PnpovX9r3HLhOW9lwp/XvAz3l+Q2S0/uuln80livx0Vc7d1VjbSIsEs21wMdfCqIfmpVgS8H6pmxlnuQvXHCqvOCOyp7fWtPev8RDD8DDFCKT3XFObbfnCEsv95dXuwfnApPXASiKsXQaIFK1JjmI1tkGbAJtASLG5f1GdiBQnnjacjT6i/1qnntblOCepRGMvRnOLUyIRU9ndDiR3XbgepXxDK/pQJfK5gvSW0Ze2nw+gWzJArEXvzj2+kKCjcJfJsgV+3QE+dsL6mBt6mjeb2yHbnCJganpyUabbKr70nWwrFxzRVs9gvoLup1ht79vvuZpAYX4uK+yUTqv/273UhkBK8tTpbtNLh3F84JxoO4OzgZubqUqt+1xRdVfELYj+YVocTm6bSHPDfTOTpofifqbHP27kicCPBlMJpL3mnE/EUQ5AQuIDPvPIL4o= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JpVbPaZJBh87yIl3WNf/W3Yw4cxmNrwI8Rsfl5n04FpRj5WKch0Am8NQWw6u+9asw7psOkkcDSgfbafaCBrpspBFViwHT+IF09mKGKbEyq5J/lpnRB6OXkcLA4cNpCDpYKfqv8VxT7k8xM4BqZjV5GFNJhcNxFYo1mYM1zzZuOpr3N+yyz0dtZSWQOLyn+ecHItNQbnNjYVIl0fAjgnZdGmidg4VmwJes2kijo/tul8nc/yrdIbNT8TAHLjsJKT/OiAMBz1ZJp8eXIJfBAd9iHTRFQ+RvfsF9AcZ9gsYLgvxhpazpajTcJmv1JB0RIGy5LZPbBPdlTc45c3sbtfo3JprRb5GuC5nrVHp+cIFwi8HH10D4TOCQzcMzEHU2I0+QF+12Mp5ZWVrrg3v3q8R24Y11ABzS0kMgNV+bfteiWh2zxkSrF5FL+SjJxT03tiY X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lQxHfglLDcc+qtfkt9Rr8oENeAP6q9NbgvVTcDDzNhzKRU5Gwq4tR+yiecg88gzAxJ4HZIAEikYWt1iinZCfr6JJNCqLdXDMU9DeJei9x8a6EuaNOxvpawILGbT6MWfxSDV1vQZxaBOOEpYbXy7y0A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e34a908a-6919-4928-bd77-08d97ea6ef09 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:29.1999 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 09/27] avformat/cafenc: Don't segfault upon allocation error 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: gPRdC8iEhKZP If an array for the packet sizes could not be successfully reallocated when writing a packet, the CAF muxer frees said array, but does not reset the number of valid bytes. As a result, when the trailer is written later, avio_write tries to read that many bytes from NULL, which segfaults. Fix this by not freeing the array in case of error; also, postpone writing the packet data after having successfully (re)allocated the array, so that even on allocation error the file can be correctly finalized. Also remove an unnecessary resetting of the number of size entries used at the end. Signed-off-by: Andreas Rheinhardt --- libavformat/cafenc.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c index 622ae14264..b17d2397e9 100644 --- a/libavformat/cafenc.c +++ b/libavformat/cafenc.c @@ -210,21 +210,18 @@ static int caf_write_packet(AVFormatContext *s, AVPacket *pkt) { CAFContext *caf = s->priv_data; - avio_write(s->pb, pkt->data, pkt->size); if (!s->streams[0]->codecpar->block_align) { - void *pkt_sizes = caf->pkt_sizes; + void *pkt_sizes; int i, alloc_size = caf->size_entries_used + 5U; - if (alloc_size < 0) { - caf->pkt_sizes = NULL; - } else { - caf->pkt_sizes = av_fast_realloc(caf->pkt_sizes, - &caf->size_buffer_size, - alloc_size); - } - if (!caf->pkt_sizes) { - av_free(pkt_sizes); + if (alloc_size < 0) + return AVERROR(ERANGE); + + pkt_sizes = av_fast_realloc(caf->pkt_sizes, + &caf->size_buffer_size, + alloc_size); + if (!pkt_sizes) return AVERROR(ENOMEM); - } + caf->pkt_sizes = pkt_sizes; for (i = 4; i > 0; i--) { unsigned top = pkt->size >> i * 7; if (top) @@ -233,6 +230,7 @@ static int caf_write_packet(AVFormatContext *s, AVPacket *pkt) caf->pkt_sizes[caf->size_entries_used++] = pkt->size & 127; caf->packets++; } + avio_write(s->pb, pkt->data, pkt->size); return 0; } @@ -263,7 +261,6 @@ static int caf_write_trailer(AVFormatContext *s) avio_wb32(pb, 0); ///< mPrimingFrames avio_wb32(pb, 0); ///< mRemainderFrames avio_write(pb, caf->pkt_sizes, caf->size_entries_used); - caf->size_buffer_size = 0; } } av_freep(&caf->pkt_sizes); From patchwork Thu Sep 23 15:28:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30488 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp566977iob; Thu, 23 Sep 2021 08:30:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMgRH1YtcFkXMmYYO5LcKgnLXyk7Zt8XT12/l4DQgJ4fcyr236AwQqctBkj1nALZaB7/Lk X-Received: by 2002:a17:906:1ed7:: with SMTP id m23mr5518521ejj.558.1632411059793; Thu, 23 Sep 2021 08:30:59 -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 h13si6349944eds.181.2021.09.23.08.30.59; Thu, 23 Sep 2021 08:30:59 -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=pxn4BQD9; 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 F153F68AD15; Thu, 23 Sep 2021 18:29:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E55AE68AA1F for ; Thu, 23 Sep 2021 18:29:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HeyAS2d4hddAuAeBedkYmR9vxAMGqjAhTNy9BC2MEl3TCER893uKU8Y1dcgsGRDvSlrXScD9CRZP4TxotqutM/Hyzr9/s6fov/wswaTUrCjlQ04umuaINB/nvLLEVvoQ4NYo+XN+V5GuRiFK3CY/hwcBq2S5MpIhxgeq+tCSowpzAABbellDi2RZXNlmgemI5lRD+ftBu39J48kd4oaPM42jtZ9rjCUOaMDKSS4vkLQ31M/6VoKOEx697DjLoseTnJRRpJ7s0Dkx9gdOQcJb5MQ1MGvNGQ/Lf0nbphkWNutCP47rc1IS20JptbAc37OMOPMilxGWLCIHhAyXrC0m5w== 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; bh=tUpyz8OZIS0QKYa45UZe78MVf1oVMj2rLmjlVhnBvYM=; b=bCan4SoV7ik6r6cBQFCMv/InBOTMd/zL/cmpixlLAfZiDnz4ozM7/hMVLNS/eZVB+AvK/W6uY9rPof889uli7O7YcgV+EnqxyITyKBAglcAH4ml+OBvDY2b9gYklLiLbpR18fu/YXzcHMUqpKtuhELlxlu/hMAIqirxO1jn4JgiLSTj2KbQj9uexJr2TXPTHyoWbef76FDnOgOqApB8PbhoRXKqxtnQjcPmsiD/fVG9ugDjOXISbJdb1C5SkZc6cyz24YBVv1DiD9WsL2YI0MjFeTU7iS5CeA2DaIGOpSiNeDV+9tEPlR4NHWPJlUoI0424nG4drVnmABCfnC+LKcg== 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=tUpyz8OZIS0QKYa45UZe78MVf1oVMj2rLmjlVhnBvYM=; b=pxn4BQD9S3qKbY9TCyPOR66bzA6lTVONJd5332M0Yzv0huVRQfhgHpi6ktljNNX1iNJJf1QTNN27lQ2Jk54J9iupG9rGOlYZ0rgW6X/WjO4oXJBdU6HwpoZhL0LA4HAa7a2fDhEmOccKCvpmSKChLYR+44Ji+hzVytwpLFaJoQaEg7DfMl9l6af6jGqIkVRxsw4M1MLDm2w5uNM34cCAsi+0iDCr94+/XqLxrdxSMJrPndfc0Sp04tc9a0QdL1adf2bnTf+rjU0/brwGqA+5zyMQ5cfNMHmFOZucCDGEuq7igwTLIsFwPLrPXzKT6cw0DFFfcckkp6MuSBnQQQbDqA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:30 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:30 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:45 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [+SHTkbE62wtJVA7o6A69MlB2MDIgD2bK] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:30 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d18298fa-928c-4532-8fe0-08d97ea6efec X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSvZ7y0GoYR9Y4hcJWL0nJxuONI1K8DmgCWYWHXT4xm6w2dN9qWoumjodPGEM4XsNEgD5FPohVX8tsi4XgHUeUimY3ugCv9ZbnjMvb6+aqR3xw7oll7tszNULOyNyrLS31t8RQaCmPcBQGZplItO8g4izdILnh7yGHrP01VjBL77CK/tfdVguTMYK7FqF3msoW0CoIzrkgyB7/sOgPHYjsRAdYXXoMcS0OAw8Mwf53acXaBMm9THtO9U/nWHXY/Ega8+lHRYqUkWVr80ElAjfruhaLw5mEwh+KA7BlPQO+cNpmUu2rXqzExD+b8BE9HaEiiGP5Se3pXdv7GX+zg+QRYYXCgVfv1/CWDYxmIdYN+58pYIO140/n+KiXH80mnWU7ht+pd10mDO/HHY/fBF17OVKa8asAXh/vB76YieaOXIGpBd9I9OH6GArVgsEZ/tXUTkDMPhOe/w2YiCZezim8Es93MpUKW4UzrslLe76qlMw5xezwnbcp1x0xZNU04yB+GbzQRVMMfHavddDQVv7Tn1wh4VULWYWhm+ATwcRYTast2uRX49QyA0oNMzt41lrgALadEqNmkG/jkDIbNx72zNUDUUte3OUnBqlxv3E8iPjfvx6seGtpgh5sWEBqOT9ahBKZz8R0IfuQPODAK45Kaz5KpZJqCOMiz6iNFgrSEPHerwI69uRvrAaYBzescSlWjJly2Q8Mdp181XXUSOkWe+lZ0R95Z3uRpwJF+VTGSVg= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R/Fz2/nnsGhfbsrsEv7w1ktQsb4FUAMyn8CZ6WfFpFGnLIl+YsrJOd+lopAW5nytX28DhJSRhy3B1yOv/w7IMBji2dymg9qK063Dsi4YvmsauVdZm851yG08fFyDu0AQ1e6nKaEZ22TnzgpeGTKPqK3FOjiSNrawkvhWL98dYrLnJ1Y1pI/sIR7Lavx2xQaCRVXj09JKvJhx1L3D+UNgCp1ixa/4P326FF05VO2oKFT+9zyl65IZVNrPlj4fQ2KyOhfYxdxXGOKAmOMLKvZjARQDWFo6tlZg0UGexWUUrfBsk03W9Qmc7w3hVqsxa3GD+PPA1K91VtSrAoRRvzv0XD0d6TWuJM+iYK1y/9kgV7djuWza1QZNs3t9cskZOA7rHT5BPfvk5tx6FsV8yoiWLVI3RLJf76cPdikhdvv79/HZpo/XzEcK/3y7sloyDK/v X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EvFvpIepIUmHggpHOiS5qBPlBTzDsKQ9Hf1986IFiLK22+bCt561PIiu9fS2A5PbEq9NswLOn+oUEP9zKWrSw0pG3IJHLK9BeboBfma544uu6fSzPoMhwi20aezo9piFDBx29P30SBoFdvAEKLO2Qg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d18298fa-928c-4532-8fe0-08d97ea6efec X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:30.6366 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 10/27] avformat/cafenc: Fix memleak when trailer is never written 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: asQZTbRjJJiM Do this by using the AVStream's priv_data for the buffer holding the packet size data. Signed-off-by: Andreas Rheinhardt --- libavformat/cafenc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c index b17d2397e9..412b3230e3 100644 --- a/libavformat/cafenc.c +++ b/libavformat/cafenc.c @@ -30,7 +30,6 @@ typedef struct { int64_t data; - uint8_t *pkt_sizes; int size_buffer_size; int size_entries_used; int packets; @@ -209,25 +208,26 @@ static int caf_write_header(AVFormatContext *s) static int caf_write_packet(AVFormatContext *s, AVPacket *pkt) { CAFContext *caf = s->priv_data; + AVStream *const st = s->streams[0]; - if (!s->streams[0]->codecpar->block_align) { - void *pkt_sizes; + if (!st->codecpar->block_align) { + uint8_t *pkt_sizes; int i, alloc_size = caf->size_entries_used + 5U; if (alloc_size < 0) return AVERROR(ERANGE); - pkt_sizes = av_fast_realloc(caf->pkt_sizes, + pkt_sizes = av_fast_realloc(st->priv_data, &caf->size_buffer_size, alloc_size); if (!pkt_sizes) return AVERROR(ENOMEM); - caf->pkt_sizes = pkt_sizes; + st->priv_data = pkt_sizes; for (i = 4; i > 0; i--) { unsigned top = pkt->size >> i * 7; if (top) - caf->pkt_sizes[caf->size_entries_used++] = 128 | top; + pkt_sizes[caf->size_entries_used++] = 128 | top; } - caf->pkt_sizes[caf->size_entries_used++] = pkt->size & 127; + pkt_sizes[caf->size_entries_used++] = pkt->size & 127; caf->packets++; } avio_write(s->pb, pkt->data, pkt->size); @@ -260,10 +260,9 @@ static int caf_write_trailer(AVFormatContext *s) avio_wb64(pb, caf->packets * packet_size); ///< mNumberValidFrames avio_wb32(pb, 0); ///< mPrimingFrames avio_wb32(pb, 0); ///< mRemainderFrames - avio_write(pb, caf->pkt_sizes, caf->size_entries_used); + avio_write(pb, st->priv_data, caf->size_entries_used); } } - av_freep(&caf->pkt_sizes); return 0; } From patchwork Thu Sep 23 15:28:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30500 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp567179iob; Thu, 23 Sep 2021 08:31:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytZw7eaGLFZiN5PmSjqmJRQziwR/BYA7UOKEmwuZG6s/zxKzxZpt00EfCzQrpBW/BwMOu0 X-Received: by 2002:a50:da07:: with SMTP id z7mr6109323edj.301.1632411071280; Thu, 23 Sep 2021 08:31:11 -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 o8si6466048edi.429.2021.09.23.08.31.10; Thu, 23 Sep 2021 08:31:11 -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=Yt87kfyO; 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 0227A68AD88; Thu, 23 Sep 2021 18:29:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065106.outbound.protection.outlook.com [40.92.65.106]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A91E368AAD8 for ; Thu, 23 Sep 2021 18:29:35 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NrLHNtp/DvS9+VUN7frwRleWmuUIzCe1y+wnqxtyj0eNJXdaEs0M/YtbL0sjsnnn6GcaNkH17EUKsbGRU70oANj9P+BBcY9GkxZzYZfnepWBEED7WYs95j0l7yo6CIHicCvbmXApmAMVW4/l483S78YZwVv8bkgglrI5vk3hSA+u2pZAL/wBS4SL3RDtM0r7WvejliCPVq7FRcMVctvDulynPfIPuL8PQY7tfDFfEoBqFvpxhhswgASNtwN2AmkTjMFnKQVQcNcraGaCReb6NKvwXiVSFykErSehJ5KGEeTKtZWy1rpHdaDN6V07csFgEcdUrgME9xdghDbWAJ08cw== 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; bh=QsR9udISBxDgaI47z+KTMmvdccWrQzOHqBRJNOdjECI=; b=D0Z7WAAmB/eij4jSMGQ61lH4H7zkyfsLGSqGr+FKG7byJbddyCR0332ObJA4I/vvWgN+7mIJ5voguW0GtelNMKzc2fLikuA23Y5iC0XSe5dOkYCAu+Zr+SNdtg/AWiNqC0qM2FBeKyfl+0B1Z/v2OWms3UwARAPw6Eb7S9ErJpViOpXj+vgy52OW17i19FiEciRRzLf9tM+CzS1wCrljH3qfe+Y33VjB93NM8j10mFERh9EFGof6mydVldaCoPvvuGTLGPPlh+zb8Tkl/Sf7Jeom7jdu8xq+cOpuaw+mAMALv6bbcu9a2skYwa/Iwtfc2nFA1KcY+6djYdwOojcuFA== 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=QsR9udISBxDgaI47z+KTMmvdccWrQzOHqBRJNOdjECI=; b=Yt87kfyO5bpcVjoLN719GYOFW9yu5KfaW8AdX4vnS0hB3u72Q3PksBj1Or1I89c8P4Mr5cOHPmxcOO3GaU34PXTLhgk0Frlo8VDzlZbTfcOJzVzewSYGuSkMzlBXwoTIlWghT9zhv1UJ7MUVOwgANgqkO/Eu1GtG5HwUnE8w4PFB1cE/YPzLpFbnUheJFLyBdOWyJQkcAMZaEKqAgsl6nRMUWBxVl+7zffkKffeI23z5+bOYoq0QnDMMb3UXDWW6UBwteSBt4Us3myTTS6rXcCN3v9qO+5wukaK2IlLbNUFCOZdA6WrSYLOQ+CMq48KKEUh5TbGyzouoZaR2TjT7fw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:34 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:34 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:46 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [pZXNZt+ea1mQDSjRKEmulYkHF7OYTlAj] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 927b4b71-9e5b-4436-59f3-08d97ea6f1dd X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSZqMZngPo3ifBJAJOclmf1kIzhQHQZ0qs0yE337EHGnVvu/fBL22IJ694gKjXJXBWhbf3WsNyyLvZP6/UoAL9/djgGoqAs1kCsPYPoN/rqM8fw7fjI6wHdaBJjtwu2EUnc09VmZxXQjZn6UV/MOAKa1I2KGBvVye+u/DMGJx3dDsa0fXOmda6W9OWsGfYeZfqOucPqN1BECnEBuAVNH4CCgKLUpCgd926yde0XBmbZ109XTzKskKjA/8PKMVSnGGSChHhswmi5PyfB21oUtHj3nEYdqAqNpo/nyv9FkCLcszdgi4ybq70yn+OxS8pboquX0ScKwwjxgLEW8kzMxCcrnl01obIycRDV1QJp+Pkd7h8VmGeH26WD9oaBrhJGiZ+fsdgnV8XPK+TImCFaf73vp3Twzof+bqthYZH8UsPeLU+SyfBRf2fUvj5BrSYxCF2YDi7dRcdtktoz3vZBY9/McNYH3B++V7zAIu4oXZI8rsZuUiXkYK87X8l3wbYM5pdK2x4/ncVQfAs9PIoRlnWjSude8bP7JzVtI3iQZZ7/3W4PnwQ6qnGAy5IgT3974PAbeiMcwhWzNOgXVwjOZNTDVQlgYcJYUx4lRX/PmEmRrE0334+nr1c2JNotHCBiXYqivvA89ZvHiEl9iUl9mOELfdZCIKXesmPBEGMhEGbgylDXHHYRLZKDxFpQs4aKonGmllvqai3nSv953dHjY2x1eqbMvA0/VKPhCT0oGhrnHU= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ESBKVWIySWPmNn3jRHXW4I5c5Z6e4FYAJHdmG+qxf4LZ1ddRQPB7V605f1Sv3vXjHxZNhjAQaU2C11CXbGFekCYGnb25JVJ2ijmroYZ8hty2oYEcUVEvOX3G8u/bwntYq4xFxuNT7Q+fUllVKBtilOAucYWS941b+2uQE0NBcmYN1J7oi2A45gaTeVcJGezbfQdBd44BFZ0zljv6HEROBP4ySdrfzvVmLQvvxog551gVpapJJ9/PZi8DgDHZDgkmRP1dNtL2ZqK48q5B6lNfJF8lrSF/kNRFEu6GD+P0ogHMNvc0JZaU5VJwuyxbOPLIsJ/Zj0QRI5yjTi4YYDODP8yWvUIrtPtYlxYhqHR6X5g4oZ9piGYjZG89nMtRfS7BF7ckrZzZsAyd2tQvr4wHgnxMSdcj9lzZxrK3NcCL5d5VUHXy/tl1z1jEBrDQ0aD5 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ToLhTrNoHWSNd+kjQamgQRBp0h6691fuWVE4jnyz5GFMqbaQuOoddJ+41+1IiIBjyw8bwo4bAx1srWfUfYnWNRFoywcNoor/PLtSJ/+qPs0LQcUCOTkSNennWurxyx66gE7/16sy3+0KY/KnfS7KJg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 927b4b71-9e5b-4436-59f3-08d97ea6f1dd X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:33.9282 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 11/27] avformat/icoenc: Simplify writing bitmask 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: /4KZYUgLuboZ Signed-off-by: Andreas Rheinhardt --- I am pretty certain that the size of said bitmask should be (par->height * par->width + 7) / 8 (or maybe par->height * ((par->width + 7) / 8)), but not what it is now. libavformat/icoenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/icoenc.c b/libavformat/icoenc.c index ee793137fd..21966f3921 100644 --- a/libavformat/icoenc.c +++ b/libavformat/icoenc.c @@ -31,6 +31,7 @@ #include "libavcodec/codec_id.h" #include "avformat.h" +#include "avio_internal.h" typedef struct { int offset; @@ -119,7 +120,6 @@ static int ico_write_packet(AVFormatContext *s, AVPacket *pkt) IcoImage *image; AVIOContext *pb = s->pb; AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar; - int i; if (ico->current_image >= ico->nb_images) { av_log(s, AV_LOG_ERROR, "ICO already contains %d images\n", ico->current_image); @@ -150,8 +150,8 @@ static int ico_write_packet(AVFormatContext *s, AVPacket *pkt) avio_wl32(pb, AV_RL32(pkt->data + 22) * 2); // rewrite height as 2 * height avio_write(pb, pkt->data + 26, pkt->size - 26); - for (i = 0; i < par->height * (par->width + 7) / 8; ++i) - avio_w8(pb, 0x00); // Write bitmask (opaque) + // Write bitmask (opaque) + ffio_fill(pb, 0x00, par->height * (par->width + 7) / 8); } return 0; From patchwork Thu Sep 23 15:28:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30495 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp567470iob; Thu, 23 Sep 2021 08:31:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuZGcoXWu9rx/JRlGe/WVMAKGQKrc+zBpxbDBpEP6HVetRZ6u1XI0OrxvJtymTAVntKMaa X-Received: by 2002:a50:dacf:: with SMTP id s15mr6196846edj.385.1632411083837; Thu, 23 Sep 2021 08:31:23 -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 f4si5481552edv.542.2021.09.23.08.31.23; Thu, 23 Sep 2021 08:31:23 -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=fbSKEG6S; 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 E659D68A943; Thu, 23 Sep 2021 18:29:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065067.outbound.protection.outlook.com [40.92.65.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1133768AC40 for ; Thu, 23 Sep 2021 18:29:36 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HE7vEybieJo9fQkBdvLNh01EPGSNe1iXYa3gN5EDHkOsaZyityMhNMUpC9Sf6TTqCn3/fAe9q8qqJs/dSrghe20EaE25ms2thRwTB+WAWdNCaAvmcUVA/sSzOf/WC3hU6vhlRHtSQ2Anzx7leT6tqrBNlWkkAJDk/rHdT5zEZAY2xj0c6N3CbXlEjYPwYwXqXhPQIqltp/PYJ5UTZOH4aKMtBCUdbL701v0SU7wDAI4vENw8NkNqyyRdd7z/BrUBIu2t+u9+TQd2dHyVsT6BBBpW8bu9PsIaIMxgzps+wk2H8EtcEPXDGb+xlddWrwfHL3tUjTYNZKtksq1HUar69Q== 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; bh=hlVqk+pvktn7SaEdoEFU4IhvUIhPDr04fIp//A0ElcQ=; b=SGn8YJ62pk9JTaVd2Ji9RQEYZMj4TerpCuoLqcAVOYTxU2786dapWeROosZutD5oZvv9zSGH2FzRiSxLtepIR8Z75uXhlpOoffO5/HBUFvziULLUQW436MeN3CoJGLjm5Sywsarnn+aEFXG8pkeZxcxH2Ag2xGNIPh57Dh1RUc9EWpKAAUj16SgApdnlTQmcbwipwhXF0s+fai+EOA2JHuuIMJpYyIC9QO0JVC6eHd2zxjnR/HhGMQWoL8rPIzugBPTWYRE6nd35hsepOnnD/hb5gN1jE9KysiNyFTLRi+KwZ+OovHWYMbKoEbdDptA7h0pFq3ZVmM8S8dsOrA+z0A== 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=hlVqk+pvktn7SaEdoEFU4IhvUIhPDr04fIp//A0ElcQ=; b=fbSKEG6SwNrhINjE3JFuF8dHrg/QQC90CrDsn7eLFVl1eQ3qYCkAzVsqEbhF+Wvcw6J6uydqXdDCehK49oyJLNpIrB9gN/2gec/HaMyLZWnlsCgbnQDFLyrwPX/9no+kcl+Movcf1M2vEpJt8OSS2MfPcHTLyGAACXMZ2fOiokdh/q81ELY4N4t51ww0I2Yhp7cje5uogs/naWpUHcE6v6fQhqkssh2rWBNo8VWELkToh0amcy1R2l1yIADZvsvEitjJqk/gT4AeRYlNyc0KEgixK8Su3YjaQ+vONiyAL1g/lwsApwrPdeZ3awZ890cdbkhg0dn0FGQQHFhn81gUZA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:35 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:35 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:47 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [9wPhnVZgUZdPvJNan6uJ1N/nTpl/ouCH] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ce7a59e-ec46-455f-24f3-08d97ea6f2f9 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdStsLmNAtom6Xwo4pYYkVZ7Dk1LM8GzLKbb8Ds4cc4dkadmXmCEllguUaMd4opQhNEOGr9sKjW/v2anoTCLetB87zIMeq5J7NxKLMQrlGGEZztZ/z1kWfv/Ffx/OQC76x9IovKWWYQ/YBc5us3kLHzDmENUDaWzhn1d4JV7zdtJUUN20j4QMabLqaJnVLHJF43zJHGCMa31JnQn8cjDJGA5IuQXl8oYXA861YETXS8S16aN9DiehIdMLV+Yf31hL0N02QV0XqdxaiQ/kpG3UzG3XgYb/b5/Hg3dI7iPzIeH4amrnRZxupfHU8fmOumGGBo1kqGnWl0smnrDUMSN6SXqLIT8VsgsUZ5al0yjYhq4skGBnSP+AFC2vkNpkWWCvr/KXaickePBm4Nx0ZKQU8IzTlsob73RBSWJXXZrzAYEjMPXhvgcCWXM3rzeFTJ8naFcWTv0nU2+LDK+vduDpvYS+vQ+dvqrLTmVAet7XN1fqb/jpVnGsyPHKKs5tJ40PI8BfiBj2QozV7GzOnGrQeiOUBx0bQVThC0MpTLnuVY6S7Di48OhRkI5tckQEQYMn3rxC1pj/Zie+djVjMeaa86GO6Rj9SrvmXF/1Wa00qr5A0Ay3fN2IVrmTZIrNA1t4Sciw+YgMdiqMv6BgA63i/APfKrPQWqqZ1mqQpSMpJOqW5S13Ey/XfWwOsIx+burAWZG7FBLBOPG593KCv2uh6pCB8Y6xw2kxApwUCYnTTuuk4= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FXFdm8b6Jv9BzyK4PzZOvLQRJ+9b/mCNFmeTAd7u5wgCuioepajKZ2va1FV7EbFFAohzz719WehXJXOtTeqzT2nRFBJ1QMWufoGSal1p+3O1BS0eQ1lZy8shSU4R9q5BiPYRsia9PJu0zPRAz5EW8vbqZky4qqKa3CsNvoCY5Ejl8wN9lhp+LTfIbBEO6aiJuzdCmiPiLzQ+EDZdDQJn8a+a1MlOqB2uhW7qu5Dvp6MGXrTRdW75HAsKZwLj2g+qUdJckb2ZqG+9jMD8fzGJvtadnoFBY3icvSWsBG/oKWqWPDIMI56RAburLptvydr0PkdIytVhaC72Eh87T1thkdaCP0BdB1FuKk28tpqfCGPSFPB4jejxkvC4lA8R80U1DG0jB59KZU9JwoViB1p/pn4TTE+2XC8LaTyuKpvMuNT7RQ9na/YKeL7B1iZRZ4kS X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2QK0AC9claI7h4/nneGXrI/EBA1hbv3JfCN57hgOenfbP7uevr9bKENBGamd/2JnS2KTj1OCcfGUmiafp9LEVXaRpr7oKzq0Ldc88nkuFM/atn4tnizEuIFDGLO2MBGc5U1c+Aopx6z4V9T5CjEr+g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ce7a59e-ec46-455f-24f3-08d97ea6f2f9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:35.7732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 12/27] avformat/icoenc: Use avcodec_get_name() instead of codec descriptor 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: K2cfWS96sRZa Signed-off-by: Andreas Rheinhardt --- libavformat/icoenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/icoenc.c b/libavformat/icoenc.c index 21966f3921..d684f67707 100644 --- a/libavformat/icoenc.c +++ b/libavformat/icoenc.c @@ -27,7 +27,6 @@ #include "libavutil/intreadwrite.h" #include "libavutil/pixdesc.h" -#include "libavcodec/codec_desc.h" #include "libavcodec/codec_id.h" #include "avformat.h" @@ -66,8 +65,7 @@ static int ico_check_attributes(AVFormatContext *s, const AVCodecParameters *p) return AVERROR(EINVAL); } } else { - const AVCodecDescriptor *codesc = avcodec_descriptor_get(p->codec_id); - av_log(s, AV_LOG_ERROR, "Unsupported codec %s\n", codesc ? codesc->name : ""); + av_log(s, AV_LOG_ERROR, "Unsupported codec %s\n", avcodec_get_name(p->codec_id)); return AVERROR(EINVAL); } From patchwork Thu Sep 23 15:28:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30507 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp567615iob; Thu, 23 Sep 2021 08:31:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzigNa5/nhDSYhgCIOH7kF/Nav0UxH0A3efF8DULPjiQUrmgt0Nar+NSfCZGH/tb7p19RW2 X-Received: by 2002:a05:6402:2913:: with SMTP id ee19mr6129217edb.332.1632411096753; Thu, 23 Sep 2021 08:31:36 -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 s25si6456836ejm.353.2021.09.23.08.31.35; Thu, 23 Sep 2021 08:31:36 -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=hXDS3Wml; 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 E4F3F68AD92; Thu, 23 Sep 2021 18:29:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065073.outbound.protection.outlook.com [40.92.65.73]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4951D68AB29 for ; Thu, 23 Sep 2021 18:29:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AoyQEBmuwX3IQNl3pnMFfBN1XeKm6A5cEwy7H72cmupJeelbSkB2mF+eI2GbvUauIsK7tDSOgT0BiAS5yBhL51jIEaCTezJQp68pedlNtU3giZsnE6exUX+KbS3j/BrFDkbkg4I7uCJ9+rWddoxuIXQmHEB0PDsKy/VDkRq1MFu6xMUSlXsUHhFM3FRmsNIgGkgl+LpfXmgDAQrAuWm4DjbjtCYg34vyZBhmSJ9BY7fbncdMAcP1I6j1nxhSbXCSGQZRfjiGtwG2osSXCs+hHUQ4w3KEytzs63c58zYdWoYjd1bN4Qe26PsPykGg852z6iCp7LDNCche/9OBS23YSQ== 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; bh=IM7Z309UPVS83LpWRN9+vu70QLqBizxtrJfV4p1xsHM=; b=W9EXpN7h+MU2QnxKOgVVlBjT+D9yiyA/8Dh+/epWrAIlN6UyxMpseqXNKy4C7f89NP+Y4cK4v21NukQeojow0AvBAl4jO7sy6ybJHl6Es8MvAET+KsZ5yWCwEZjXMIlBvisXgXb5I0l5uNwob0fr62pfpN8mloB3wrpvI3ivA6UyujimZbFIe6uHQjUH0xBGg0Wf0wUrN8AJIB/nCo5GB8p8ZfdeAzcFFNcebfsmq9LvOPCMQsPd/JWnzKRSp0zXCpVdFODGSKLIDl9I+FOMMN3V9PtS9p2u2+C9mg54Z0nyTl49sFemT6P15rmTMvlPyz6U4sVWns6Q2foZbS+bUw== 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=IM7Z309UPVS83LpWRN9+vu70QLqBizxtrJfV4p1xsHM=; b=hXDS3WmlyotDqZqGdgY3hU3MdQqxept1VNIN5Z59CwLgf1SwHEAmxCpZqIrCg2pXVVGdZYH3ij/WyiasCQLH0hu4plDgaYPIWjxdn+ZG3YShtnypXVubwkwsolzNmwglJYR/IKXpU4p4Bi5JTUmBXx0yMMkkqLI0h2FRP2YQeUlyhogRgWv6+wRLthILx8ow5GVRDXbKmSHfk5lDBFJjRB5vd9w7oqxdF+zsPohObEPcU3GxbaYv31NkkX33tEut16y/BOMF5XH6SWXM7bxasQyg5ZRcxd8esRJZBFmmZgiINfHn+06qmP15arv2CWEZrLxPojOvMYz/31OEL2lLiQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:37 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:37 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:48 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [2K6+dBEMi1tkHJdI/sx0ywSfiWRwzRPV] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-12-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c9dc2c2-e716-464a-2606-08d97ea6f3af X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/ULYlaWyz2NXCnwh7Enrihvq7C8EEthsr9c/bOO/VK1u37gIqKZwCRQFebaLs/v2Hlv+HRptg0aVBv/HsZUMFpVWan7aUI5SGX72sv74RwJw4c1wfXL/hWKh32sGn/Xvv80NBH+sohCkxzzbCTfMJuPZxlyemK5VqOJHjqNoINtAf/tbsZj5Kw+KM5Iz/ji/9MR6wqtR5ZofZKUymYxo6Z+j2DQUDDAEVEMP0ZCS6FP3RCAZCKDBeOkX1Y6JTtKX/DIYPb4oVl9L/uHrOSjCKyNbStTc7MPdnHbTr4rUek095VI85geYQAZbLSWEpz3wKeMYHJDNBcuu8gxaWI1Dgu8e/U5Ppb2v46h4JZt5ZGEiEnfp5+6+4j+a3vlG3Y7xzNDs5jC9oyybXRWs0APMQXiF+6C9wwSua0hNwDEXV34Lpm9+FuOJQR5ptZdrEBSpJj9PXoKEaB8MWW5r6oF60VVOrFQaWdckH2J5zrzU0+jGsAxh1pmXnG0LEInUgw5W6QrzjKgzDT5E5cLl3d9ATfnZX4eVBqLHv4pKag33Qr88fKohr47losZFfIrtuWFeZvAmNKMPOCngLV7LjqIP5bi8BS8RqTBfqqSDaWOWG5XK2pR0gS7UqXZQzTH9a2Pt1BHKPQn4TmBGgSaWo3XN8Yj0AfbsMzhbYhaVRcM/G/bGysl6eh5mcgwkNSc+qdcoZH30RLrKkqbRNg== X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MtGZKOHlhV3i25EH0S6yDKNpxn/2dtBgVxd2tiGYYcR0xySG8z5DmZWcMyTthfLLOpkcJc0JUriSUMfZiKnaCJB9+qLQK2fUAwMfbbodDFaMD9pGvlSyiHS22mCKzqPwsLd8iGtFKyFeXEJ7thWtkV7OGFNG+2qnSjSdA/OnazMWVpwzhTsw73a/PcHqMXmDszSBWZxTy8E7bt8RR3qUeIFg8bOVpo143uGd2yp3CguJjc6CSXB92JTpK8P+LnUVBYahygocV2DHRnTHENe/6E1nJwszDEMmvJCOhQLCd5W+KdogdaTki0JGZwK0ZJJWlT9T9mov2MuuaKHTCC5JrYQguxYt73nKAXAHx1EiP8YaSw5mIu6QnHInPgQMPqQoelhWmC4bt91F7q7N3EH+rqKPrwLMl6Fo+Nsum8rcn9TK751msiC0JPkG6zyyhTUH X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xYJaIGnhfakjkS6l+f4tBnibKyghcJ9ShEtqkaOj4HmUdZv23C8SlK8mwxMn2XO2MCLXU6Sxmh0vvfl4FmxPxUl3QRANdfXh7uc4wlLTU3lFUCdWCMWV0hfoH9bJC1UaCoXQyKOKhpDZg7+//GeOBA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c9dc2c2-e716-464a-2606-08d97ea6f3af X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:36.9829 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 13/27] avformat/movenc: Limit ism_lookahead to a sane value 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: wQNqQ5jrg5Dq There can only be a maximum of 255 entries in a tfrf tag, so using more makes no sense; moreover, several size computations can overflow in this case. Fix this by limiting it to 255. Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index cfb5a5c725..53c8ffadd5 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -94,7 +94,7 @@ static const AVOption options[] = { { "frag_duration", "Maximum fragment duration", offsetof(MOVMuxContext, max_fragment_duration), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, { "min_frag_duration", "Minimum fragment duration", offsetof(MOVMuxContext, min_fragment_duration), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, { "frag_size", "Maximum fragment size", offsetof(MOVMuxContext, max_fragment_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, - { "ism_lookahead", "Number of lookahead entries for ISM files", offsetof(MOVMuxContext, ism_lookahead), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, + { "ism_lookahead", "Number of lookahead entries for ISM files", offsetof(MOVMuxContext, ism_lookahead), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 255, AV_OPT_FLAG_ENCODING_PARAM}, { "video_track_timescale", "set timescale of all video tracks", offsetof(MOVMuxContext, video_track_timescale), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, { "brand", "Override major brand", offsetof(MOVMuxContext, major_brand), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM }, { "use_editlist", "use edit list", offsetof(MOVMuxContext, use_editlist), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM}, From patchwork Thu Sep 23 15:28:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30497 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp567808iob; Thu, 23 Sep 2021 08:31:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSnRmNmYrZlEbwaIQq6hr8cbkcn4g+AXyBAaO5e7ss+f9N8oR7UtVCxuiXjR6g1Q+cZlwf X-Received: by 2002:a05:6402:1241:: with SMTP id l1mr6041683edw.123.1632411109062; Thu, 23 Sep 2021 08:31:49 -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 k7si6358256ejk.77.2021.09.23.08.31.48; Thu, 23 Sep 2021 08:31:49 -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="FPZgh/DS"; 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 EEA3168ADFF; Thu, 23 Sep 2021 18:29:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065067.outbound.protection.outlook.com [40.92.65.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0ED6A68AD3D for ; Thu, 23 Sep 2021 18:29:40 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jkf5mjOTmXiYwpZ+6kb86JGZ9j2v5ZTpKF7sHwcf7nHUOTsXcTKWZEBCInyviW7uFvNHVZluwep/KSsU/VM0RuMQtT0qBhNW9Nz7l2Xi70TPSPDlD9Sl09sB+ukfhAre5TC8hBftHT45+v0PwoGv9jhM95WF++dWADaydF4ap02yEr3S7Ey2ujH2/6GFc+Eth6SDHqg/nbRxN5SdoI48HpWUTQwTmwVeZCndKv5o3LEig1zXW+4QzLkb0Lz3CQajZte7SHCU8PFCkZjl23fLf2EgDKLSBHrjzmo560mQQgUP+CqifqHb4IYrHlGsX5stjENEVlMS1u7+mJRx9c0bhw== 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; bh=b2reFRkQBmznknVouBzVyhhDmV3A7WJSfKDBkKfxFRc=; b=e9lJRmFuvuYRV/e5ULnHV5N19R2zCqFHi7cePtjiHv3+U7hxS77h9mnWispKh+droxsI4+nidLEoVprpkZWMtBFflOvQKdPWepW1FoQqS1G7YEQf2pJCLLIPTHAj16f0egdVBAhI7st6SQgMPMwJK0CqOtCsKhrf0CLeiD39Hvulcrj+Mjab8006aJnq9s6BONAQXrEhUvmADEpIRRWT1EOfA3oebcAAEHMB+5XpCPxKh1a2bEP9yddAEMWlUK9bvlDu0ORzRy0qA/bUeKYSzxvgy9TioaEtglIy0+5xNM93ATM+ZiKeRLP1A/yj59b4MehR76jauLxPQuPONs72Zg== 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=b2reFRkQBmznknVouBzVyhhDmV3A7WJSfKDBkKfxFRc=; b=FPZgh/DSGgtkTUWJVyyUIPfHhA8r7ENDIv1GVPweZwelKLoUfyhV5nxS2Fcn4qtbPwUjQCHbB8YGPF7GvJNLH34dMoKX1XDkJCs9ovEyV+I8dSKMIbji1gxw7hqy4motbV4WJRwikAzrD4B2qJkxqUsZgcmlTO4cLWJjRq9hyapa+Vs+gNm26rZToU988ynAjX2SMGRWqfjOMw188Rtvie67O4dXxChgqiZiidaRMeQgl86np3OYgu57uOQ0bAOz+aIu5sjsskqVlaEHW3YA+9RRDgxtgaQYV4Q5zyW3itNbgBgriPx/N0kOKh4rNIpREB4NMEpshWtI5gbJEvIBKg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:39 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:39 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:49 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [Mcam92j30rAlM0VvNNvZk7DSYiM5a3xp] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-13-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4d604216-a0f5-40cd-348b-08d97ea6f50b X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdS/wNQIYVWoZnnkfevVsWhaCF3lUsmvVgmxBz7GXfI97BrvcJ0den1+XBIgf3xEpPC8Cc+Rr33LOPpoBMc4mSDzth1BA85/BnDRxPkXVGTgBGu7l6oYR0Jj28qjkDX/5M/LNx/7AgJfA+8EiddzYlND6LNw4orTtNqejHO/DXnRla0ce3NLLDJfBcH6tlbGCmzHuz+CUcDk2q2AsmT+gY8gidapoAxiKeendvY4abPgohaKSBvrxR8q9x2381PDl7wseLaL2/UcBdNsVb7zvY6jUB2jcXs2B2RYE7KDsfuq6wxzGWwNN+EEIGsOxqb4rJIK2ZUxDjhQe66B29gpkmKhHs+zic4mbM2ElY7JEyL7+YmlRrlFLjvTfaBjANz+bdKrd8nT0SleSDzmfta3uyczmms4aK2Pr3SLcYm82N4fJ08YnC0dBr4Qa+QQjCdR6AT2+3OPaHJTwNKEpe6xYM+b9ofVUV4y3b8xAawhRkFmbe7zq66NUW9OHBN3G612Hfo2djzv+DKiLWlu8EVQ2zEmFr9DbyTnoCrSRPrhJPw+3QqltAma1lEKKPw8AWULquYPI4hAsl+xMKWGK+bGHxkh9Wxf4QFmywNI58JqsFqN06ZRXxf5/jqTjio0aZkJHNUo3RB1US78ocAO1qHCI6XU/SJtIXsKcfbFv1IcUeAHNpzVSvvJkmeda8Uj+IJP/Ce8jFPkH234BstbHW9RnqIb/fbg7ZGhMOCBYwVrzB2VHM= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gaC/jI/N04f8dtnQ8CkLZgBsviOYMVu0ELg35BRp/JxemdyR1QEY8DujbRKDpkBmySb/a43083uPj40wH9J4hw7r3j/Rw7KQFkC3N3mO8/U1tRNDquv2u5mykWLPW05xNNEkJJR0cmSsR3d1NtHu29Lj/ZVlmYWh1Sl+ZApNQf7vtXlBh8KzkfDcUuIyL9Xz/SrNlqjbMZD1QH1pfOjy3zWOGeyIFeIztCw4gCVQbme0JOcXxv/tL324bcFDw+p4JSJ29K3KVUEv4H6Nyr8oMrsPD91k318O+X+1iWqtbUwn7SFtN2NZSO0t4YLS3X+zvjxLW5dwRLBJK/fPvjtUZ8tnUF++k5TkPMYFXfaZHWhh8WfQW5Ol4cxtOO88yPmzAOwYbnIRkbkQXtgjaZ5LnTX2IWCRMXyIkFI1Ot7lTFyuTo6tUKRroWn8lmACTFEZ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gwoVtpQHgkjAzF+kDAacpVrrlrIoKgQQj3ueE6KgCmrUqhcdWSfIOl3L8K4qsGDhf1lM6xspiNX8FmVCj7VkmM2LZjcr5y2axSYPbr5Eg72XIEay6iQEBUmDhIXqcN+m6aVMXsH7V2wSWk4F/247qw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d604216-a0f5-40cd-348b-08d97ea6f50b X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:39.2310 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 14/27] avformat/movenc: Simplify reserving space for tfrf tags 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: WptzZsJcBE8z Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 53c8ffadd5..7650ac5ed3 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1344,7 +1344,6 @@ static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track) /* also used by all avid codecs (dv, imx, meridien) and their variants */ static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) { - int i; int interlaced; int cid; int display_width = track->par->width; @@ -1419,8 +1418,7 @@ static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) avio_wb32(pb, 6); /* unknown */ } /* padding */ - for (i = 0; i < 10; i++) - avio_wb64(pb, 0); + ffio_fill(pb, 0, 10 * 8); return 0; } @@ -1925,10 +1923,7 @@ static int mov_write_dvcc_dvvc_tag(AVFormatContext *s, AVIOContext *pb, AVDOVIDe dovi->bl_present_flag); avio_wb32(pb, (dovi->dv_bl_signal_compatibility_id << 28) | 0); - avio_wb32(pb, 0); /* reserved */ - avio_wb32(pb, 0); /* reserved */ - avio_wb32(pb, 0); /* reserved */ - avio_wb32(pb, 0); /* reserved */ + ffio_fill(pb, 0, 4 * 4); /* reserved */ av_log(s, AV_LOG_DEBUG, "DOVI in %s box, version: %d.%d, profile: %d, level: %d, " "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d\n", dovi->dv_profile > 7 ? "dvvC" : "dvcC", @@ -2159,9 +2154,7 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex avio_wb32(pb, 0x200); /* Spatial Quality = normal */ } } else { - avio_wb32(pb, 0); /* Reserved */ - avio_wb32(pb, 0); /* Reserved */ - avio_wb32(pb, 0); /* Reserved */ + ffio_fill(pb, 0, 3 * 4); /* Reserved */ } avio_wb16(pb, track->par->width); /* Video width */ avio_wb16(pb, track->height); /* Video height */ @@ -3506,9 +3499,7 @@ static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov) avio_wb32(pb, 0x00010000); /* reserved (preferred rate) 1.0 = normal */ avio_wb16(pb, 0x0100); /* reserved (preferred volume) 1.0 = normal */ - avio_wb16(pb, 0); /* reserved */ - avio_wb32(pb, 0); /* reserved */ - avio_wb32(pb, 0); /* reserved */ + ffio_fill(pb, 0, 2 + 2 * 4); /* reserved */ /* Matrix structure */ write_matrix(pb, 1, 0, 0, 1, 0, 0); @@ -4668,7 +4659,7 @@ static int mov_write_traf_tag(AVIOContext *pb, MOVMuxContext *mov, mov_write_tfxd_tag(pb, track); if (mov->ism_lookahead) { - int i, size = 16 + 4 + 1 + 16 * mov->ism_lookahead; + int size = 16 + 4 + 1 + 16 * mov->ism_lookahead; if (track->nb_frag_info > 0) { MOVFragmentInfo *info = &track->frag_info[track->nb_frag_info - 1]; @@ -4677,8 +4668,7 @@ static int mov_write_traf_tag(AVIOContext *pb, MOVMuxContext *mov, } avio_wb32(pb, 8 + size); ffio_wfourcc(pb, "free"); - for (i = 0; i < size; i++) - avio_w8(pb, 0); + ffio_fill(pb, 0, size); } } From patchwork Thu Sep 23 15:28:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30501 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp568026iob; Thu, 23 Sep 2021 08:32:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf+fg04OMFNe24tOr7ApNrV7BUuy22F8ZyFXsWAvFUkWOKekcNkrgreEfFqxWvA6USCpGc X-Received: by 2002:a50:e005:: with SMTP id e5mr6118764edl.211.1632411121524; Thu, 23 Sep 2021 08:32:01 -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 6si225174ejl.543.2021.09.23.08.32.01; Thu, 23 Sep 2021 08:32:01 -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=UaoEj47D; 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 0AD3168AE3E; Thu, 23 Sep 2021 18:29:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065030.outbound.protection.outlook.com [40.92.65.30]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 417BB68ADE5 for ; Thu, 23 Sep 2021 18:29:42 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k0OvW/rkOpEX4K47mQpT0t/3MI8Ir9H3lTCRRU8/coDXmB7MYC7DlDUGKlmxresOON8zkr1BG6vjkuhJrphCm+pOxqmfmHW+bcBv0ouyefBgfI+yL4OPWCv/CSsJjjZtx52vqBkFwi1NYlMDvpU/qZ0qOdm1NTXKjVv8vdZjxExhz9RRP26pXb1OLVjWWWPx1zCsOYOOTe+OYxUatldEkuTKbwtrbrqRVJ47O5rY29em+rmk2ZS+xrVC/7snCKTi+QQJ9zH1A9UOqtqlHTe/bfW7fS6fF5G/mKude85rnFI6JWFD2/wlYudtSRV4FGMePZmk8hroYscK0DBhfrSgVQ== 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; bh=5ENcrwqGl9tuQuJoWZkiP/l3qZ7ZORjAOmnG1/lv6vo=; b=YJPyRccZH4QCRjcOIOzju4aMOrUdoHRgjcPJe8y7+Y4BORhWFNlujI6aoSaTuxZVU0eroLcA8YfUZ/dVuAVfcoux5lrx0WrHqenBW6xPQplufDomLvmslCX+r6wS1IpekfC5mBl7n6pxi6k/IyqoTsEN8yltgJcY6lCMIIfXKq84tPNVNhHtMZ9qqxZdu4c8OPaE7iefmH6sLKRYwFzMsjne68K1aL6YpZFMxdhdNGVAoOlqKjO4ix4HlSW4V7t3Wng0w0XmE+7kreonE4K+YJH1ML6AGIpczJa2F0wLtYtxvIlodOvHThKbXc3Dt4zoGYwYkQj26HuXOyhtA8M+TQ== 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=5ENcrwqGl9tuQuJoWZkiP/l3qZ7ZORjAOmnG1/lv6vo=; b=UaoEj47DeLpDDTXD+OLMUcr4OJNRzuvfcqe0Qgkg/RrBQcx9XoOQoL3gx6REzU1S+T4OvgEs/InR/FBZr/8eZnzgdjh5JzjtpFpuHtlw2Knk1IAzQtsOlqd7423u3j3a1hFaezi9pV8RbWX6ziTCzEAzXNSWx/J4KxyNb4yQLAw5j7GPvW3N3LEBK66mLRd/vCecC3DPGKL0cI8NkTKTWnOJShDsLs25NchMNmeEBV/gh6dvNOklNZnXUF3EwkC7tVj/RCRSrZtsfH4ok68GUzuu4EM+X0cCXmuMeM/TEpYcesePrTBPv3u1yyLzmPaIZKoeq6bYa8h0uMs0qO85Kw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7061.eurprd03.prod.outlook.com (2603:10a6:20b:295::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:41 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:41 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:50 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [1q0md++R2SoiYagiUcoMZ0isGLAD1X0J] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-14-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a09f72a2-8eb5-4c60-d540-08d97ea6f670 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdShDAvsNw1gANLjLrLtccPy56kmdjOcR3S28N9bb5y9erYFb1SiZcRrvEmJZHkoayoMhvPBp5IbOItUSIGb/ry6Vd/oYySZGOr3cKTM9kwh1unOoLO+ESYsJujqehYD9vuTnPYCnjL4CkOuQG0dGkSDOS+r/Y03iLVOlIEy1CO/54gOunk7mtmw0/n4m2fDsL5CLRxxtcUo2MVessm7WBuBMd2FFyRH12XztZW/DCw3IErnBeYhkEsOKQ5WCILeiiYY3VMZtOxx15SspU2i+2XOVkXafAnT/0diooq76o9nC0FRMbHkO5bTfm6Eus8aWmkLpBgdlYNWuE0rskNlUxDUjJ8cnwwQgOe59QVgZq96adsT64DD14kidnCyj45EnQreuSd4RzV2g9xCKYRp1f2YVgCPwg24ZsDBd8nJr4o8WxgDCUvKFS8fv45bUf12tTPRkl175SRrRo3qm3d8xwAmwuj+4TC8TFXtM0kNXuv3LMWbysGHw6bnckBH2dOl0VznpVyPIIK5B31biv1b7UijuQFuq0780nGywaTKXCycWWH8DK1RAA/P3EbzknvA+NllwkSTpSv2E7rPjI/zeBxlJRqE5IxZY2jqD2Nfrc878mX+e1N6jROUyh4sFIwgCU4MzUtNovXRg9tbsJy/uxzqSX/rLXHpxqRlyrRfmt4U6K+B1tDUhwRQlm5ruOn+YEoTZzV8NHLGW5cAuXB1U7q0sc7sg+x8gQbsx4Ya2pD9Z0= X-MS-TrafficTypeDiagnostic: AS8PR03MB7061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3TqLzClHyMGCc6rceSSxVWhwYJlG8AgAlGfP8mvR6KYiMm2mgrCZ96noXZOwuEpKI8FdkHLh/EME83XHRNQ4CZdWYgiGW1YFdMGjOu5+zwUpNmETksJlLNdeDXjmqgYe4+ObSVmIxPwCg0P/m9cZQxQ1jbwickbvvMk7WKnRqOpjr70m9/ySC97DOVGmYe84St6zg5B9ncZaLaHBBahI22CMbE1dZoMMOtwSvjM3pcLxgXDUPaSI+ttsi8lI53Sx38ewWg5EXilij2hUBshY4NrX5DEs8yYRkBiJhuJxXyGlu9+EhjvloSs0caejdM/W84P89rorPBB+YywUX6l5EPuvf8x4f5oxOB5reMZgQK74kX79/GPbPNCBMISLehDeb3xDJW6GoSIszlNgMNZiDLIUsbCgJl4AplvgXHW8Du+gkpe5oluZM14wNgnmXFCJ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rfa0mOtjdYmgeKkCw8uvdzRHRACij4Park75Jr1NprcqDuwQDC/JohJ6XpNarf16JXrFjs5oNV7hbbwkDC/B9Ur3G9zXBZRwJ9xKtSUweXJRxhmjv9bVDEx8iJs9cuqWIwkRRLRQ0CpbvGnzHAg5hg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a09f72a2-8eb5-4c60-d540-08d97ea6f670 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:41.5609 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7061 Subject: [FFmpeg-devel] [PATCH 15/27] avformat/matroskaenc: Simplify writing qt-compatibility header 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: l0IWoGmb9cvO Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 039f20988a..f17665b0c1 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -785,11 +785,9 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, if ( ff_codec_get_id(ff_codec_movvideo_tags, par->codec_tag) == par->codec_id && (!par->extradata_size || ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32(par->extradata + 4)) != par->codec_id) ) { - int i; avio_wb32(dyn_cp, 0x5a + par->extradata_size); avio_wl32(dyn_cp, par->codec_tag); - for(i = 0; i < 0x5a - 8; i++) - avio_w8(dyn_cp, 0); + ffio_fill(dyn_cp, 0, 0x5a - 8); } avio_write(dyn_cp, par->extradata, par->extradata_size); } else { From patchwork Thu Sep 23 15:28:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30492 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp568235iob; Thu, 23 Sep 2021 08:32:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxkqn4Y7CZYcDRQgqTy2EZlHwQ29r31RBzC3PlEZva27wJhz5opITH28t2LitsZlK2rK5j X-Received: by 2002:a17:907:7785:: with SMTP id ky5mr5739878ejc.247.1632411134669; Thu, 23 Sep 2021 08:32:14 -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 c24si5907571edx.457.2021.09.23.08.32.14; Thu, 23 Sep 2021 08:32:14 -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=OmfxwO3e; 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 2277068ACB7; Thu, 23 Sep 2021 18:29:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073018.outbound.protection.outlook.com [40.92.73.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DFC9E68AE0F for ; Thu, 23 Sep 2021 18:29:46 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PBXD6iuxQEo9iZnkRwgj4h9PKq5km+wYwsSx41/6xiAPxg7k9iGYJEvVtT470qyHS2gUmWopV1rDMx9XSfjtHyNNasSJ3VdTwDTXo//x3+tOzHy2PfDCosyY8WMuL5Nm8YNBsYGakJLrofrU+nguaitTGfv9n+7ol/GaQM7YGycy98RtZytMZMDP7Ooy/bTYp3aYNo9URWRI15C6mIAkiUHzrxaNG3v9FD1bhKa6DRs/6ltCSaLmdOKc7o3XfAQq+uX7YX/a+XqLYVelqkLlbi8jRLAC9c6gyl0HPh9o0NDX0yUA7Se++3fGNwtWR+r0ZBbt1weYLEJRQvIYsu7AcA== 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; bh=JdQaRSWi7wrNU20vDpsN0MXzMeePyZoP35WSX3ps9/4=; b=RQe/vGqiGBSqOSi4iFNyDntafkPqfQHqmTljM0i33D28VIL6852BXPT4gzGTkzp59pfkyNUmRkLauUAyXbCb+nrJHq7zWfJ/X7Dx6T0KtDmYWsqhvGQtHuPMndR4kGZljb5WRxAJkaC6b0wBmKXOcHeJifpJRMQ0YfvLxW0D+hRwQiXEwtrqK8BSOEuSU+5RVSzjnHRFbPyTqYJ4vmJBUim7Md6R0QuSYTHml0XuSyEKAWXr8tG2o+yZYy0sD43x2EetmHBU3US2fhUMjbyG30ZUNElYKsd2SHsHFwwCQywU2ttk0qQoRlyR3K34lTdd1nFg//Ldnu9q4Ff7ekpnuQ== 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=JdQaRSWi7wrNU20vDpsN0MXzMeePyZoP35WSX3ps9/4=; b=OmfxwO3edgkJ7ASZMusfQIR7b3jDSl3TtoXeWC1xdV3IKnvdvMJtvmp2YKEKRBTwVpG14ykHJGDBAUDottDHGi1XNToQ0u+ijs6r58h6ITVSvTKdlaV+xwvB4Lo1+d5zZZSTfCqeB5EMaM+LNS1QacCltnPqEu4Tt8pQtahPkBu0ZpHEf4s3TxykH39+AgKhfNB9hupz8ITmBcxq7jpTftSnRLB8LhhC8NIwGXdovRJogw59pLzJQqeqwj4TzLJRI/Z9ztRFlvLIejfObZXzWStrz6u/5NbuiUAsRc/+6+FAetdN48PdR+n9aZXYLhNtxjsDj79PslFjoOtPQZDn9g== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB6807.eurprd03.prod.outlook.com (2603:10a6:20b:23f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Thu, 23 Sep 2021 15:29:45 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:45 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:51 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [RCmPULWlmkWEFbPQT3TFRyOFS48IdN7m] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-15-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5e28124-b5a6-49ca-7c81-08d97ea6f8c1 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSKsShyNf9XGYQwGaRDRdpKWqLGycdOhhNNIxDIPAhL3fOjOEbPYTcXjDSlIVm+EQT81gspNQlFew+vS2KdH5bw5SvYyTESZIf8+6Hpg6Imzb+5Wj+RZ4P3q930xyzzOtwefKE6Ixz04kSYLdy6Qo/ABgr0eRbEK+XW7luEHNlSWy9CILY5e/TzFaHF/RRd4zRpcpK3GtTbJN4XpEKbvcvW5cF+ekFqY3k1ic22N+XvnYHJGLhQH4/T6QD6Dt/7pi/NrluHBU5/DyzQJO/NELdK87DeuToLAMxxn4NmtCvxFLihKhM2UgJOGsbntUy4yOyL1Eh4jR/Lu0YUfdl7tCpnsNm/ACdoV5w0DXCgZmv1HLn1zrXh7DYj1poBvVPN5qI+d8ZFcGUj329TRWNenT5TGW5W38zJnWSuQ1k/SFHW07bgKos8t8FfJ/tsRMTQNBXNkAjRbiBqVRDvQIzKBfkszD3G5OxgN7ZR9oM3xSxgU62kcZzUb8L44FrL+ns5wokR7odepPTbmtS/CHKU0V/tBqejsK6c17shqy0VfoDYYqUvI/jcg/nYfwD9g6dEC4oCLgUDywIRLZ6RisoEg/e6zogEVrGWBSyqx6ZqHoxw2dIYym9tS4zs9969CKaCGUezTVmnhxydN/xMADI8FlSAaSn6tUlyqnwOpCF5xLUpoQKQDJOFxlN9eMS1aZdISVuAaHP/XEbydfxgOcYT8yqd0kus3vlzYBpAS5BQcDn6os= X-MS-TrafficTypeDiagnostic: AS8PR03MB6807: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BXjnPWIb/kgpbAjrMtmTBzgaUsGQgo8dIAUH/JtPIg/Ld2ku/H6XT9G3rBhGlLPaOyflRh7Pi733Zz3VqNVMFGvYv5Dv/zyZdRWFW/P6qBo/zlSRsUkdlZLaft0K8bmA3UAafGkofP1LTxNqFsW6Wf5g4jvElV22sAOqQKZHc8HZAr1VHoeYu4Ib37mA9nmCmyvjMI7CmW4T0KHWG9coLaASek2GKFTFDd09Ho4JgS2HArfujtrlhoiJS6cLo2byVOirZ4tLXpCqfr/8W7TOCOzzlydeNHFdUliOhDpTnKgdkjKzIVfi7PCyYk1X3/WAfBBlKPCKljnexR/MJJ35YygtSHwQnbUhjKvzkWbWHDfVi5o8bTekMRnsL3z2DgtWWYpa+VFbaZY6z7h3S/tm54eGD6pTnKmLKlmRmY7V2ntVJfWsoXWyTcIKkkWKIu/e X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZpSYuFHmdkE6TP5ZldJLo68FYS/y+bNuavYBRsGOj+JPhU8TOcV14JEqFbQcddl6wXQqBvb5pJW8zvX3OduJbuU6MkFyFAo9d4P3RUBrvxjxiOnqP/jzHAjadIb2F5uY+/00W89Vg3SeSvNLHsswSQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5e28124-b5a6-49ca-7c81-08d97ea6f8c1 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:45.4518 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB6807 Subject: [FFmpeg-devel] [PATCH 16/27] avformat/mpegenc: Simplify writing padding/stuffing 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: 0251IIGTGj4U Signed-off-by: Andreas Rheinhardt --- libavformat/mpegenc.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 6aed527d50..b1d8bf9c38 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -30,6 +30,7 @@ #include "libavcodec/put_bits.h" #include "avformat.h" +#include "avio_internal.h" #include "internal.h" #include "mpeg.h" @@ -598,7 +599,6 @@ static void put_padding_packet(AVFormatContext *ctx, AVIOContext *pb, int packet_bytes) { MpegMuxContext *s = ctx->priv_data; - int i; avio_wb32(pb, PADDING_STREAM); avio_wb16(pb, packet_bytes - 6); @@ -608,8 +608,7 @@ static void put_padding_packet(AVFormatContext *ctx, AVIOContext *pb, } else packet_bytes -= 6; - for (i = 0; i < packet_bytes; i++) - avio_w8(pb, 0xff); + ffio_fill(pb, 0xff, packet_bytes); } static int get_nb_frames(AVFormatContext *ctx, StreamInfo *stream, int len) @@ -634,7 +633,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, MpegMuxContext *s = ctx->priv_data; StreamInfo *stream = ctx->streams[stream_index]->priv_data; uint8_t *buf_ptr; - int size, payload_size, startcode, id, stuffing_size, i, header_len; + int size, payload_size, startcode, id, stuffing_size, header_len; int packet_size; uint8_t buffer[128]; int zero_trail_bytes = 0; @@ -685,14 +684,12 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, avio_wb32(ctx->pb, PRIVATE_STREAM_2); avio_wb16(ctx->pb, 0x03d4); // length avio_w8(ctx->pb, 0x00); // substream ID, 00=PCI - for (i = 0; i < 979; i++) - avio_w8(ctx->pb, 0x00); + ffio_fill(ctx->pb, 0x00, 979); avio_wb32(ctx->pb, PRIVATE_STREAM_2); avio_wb16(ctx->pb, 0x03fa); // length avio_w8(ctx->pb, 0x01); // substream ID, 01=DSI - for (i = 0; i < 1017; i++) - avio_w8(ctx->pb, 0x00); + ffio_fill(ctx->pb, 0x00, 1017); memset(buffer, 0, 128); buf_ptr = buffer; @@ -835,8 +832,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, avio_wb16(ctx->pb, packet_size); if (!s->is_mpeg2) - for (i = 0; i < stuffing_size; i++) - avio_w8(ctx->pb, 0xff); + ffio_fill(ctx->pb, 0xff, stuffing_size); if (s->is_mpeg2) { avio_w8(ctx->pb, 0x80); /* mpeg2 id */ @@ -891,8 +887,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, * to prevent accidental generation of start codes. */ avio_w8(ctx->pb, 0xff); - for (i = 0; i < stuffing_size; i++) - avio_w8(ctx->pb, 0xff); + ffio_fill(ctx->pb, 0xff, stuffing_size); } if (startcode == PRIVATE_STREAM_1) { @@ -925,8 +920,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, if (pad_packet_bytes > 0) put_padding_packet(ctx, ctx->pb, pad_packet_bytes); - for (i = 0; i < zero_trail_bytes; i++) - avio_w8(ctx->pb, 0x00); + ffio_fill(ctx->pb, 0x00, zero_trail_bytes); avio_write_marker(ctx->pb, AV_NOPTS_VALUE, AVIO_DATA_MARKER_FLUSH_POINT); @@ -950,10 +944,8 @@ static void put_vcd_padding_sector(AVFormatContext *ctx) * So a 0-sector it is... */ MpegMuxContext *s = ctx->priv_data; - int i; - for (i = 0; i < s->packet_size; i++) - avio_w8(ctx->pb, 0); + ffio_fill(ctx->pb, 0, s->packet_size); s->vcd_padding_bytes_written += s->packet_size; From patchwork Thu Sep 23 15:28:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30505 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a10:ed07:0:0:0:0 with SMTP id jg7csp770118pxb; Thu, 23 Sep 2021 08:44:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrj3Uc72JBrYaCveyr2zPBm6dIzsiPg3Zyc5Ju68yXA5kNRr+Qiv9XL48LlWldrSIBtcWB X-Received: by 2002:a17:906:e85:: with SMTP id p5mr5600628ejf.159.1632411861336; Thu, 23 Sep 2021 08:44:21 -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 3si6918982ejy.586.2021.09.23.08.44.19; Thu, 23 Sep 2021 08:44:21 -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=Z99VZ1Qu; 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 9917368AEF0; Thu, 23 Sep 2021 18:44:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072052.outbound.protection.outlook.com [40.92.72.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C939068A61A for ; Thu, 23 Sep 2021 18:44:09 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ff3ClthwJQIR7sLifktZq4Hnzx3QiK7e/syFiLI2NZo4XAZma/oOeNDOiVFVgspssXeegCG5Vt/7LyhfGtFCJRv0vqKHD1A5z9a2asE/jqHvSsGq9xrkOZqXknoCMMH89ntXaDgoazqcJ4MkF05uU94xYYCFmFdYl0h7urOExGdefjixMzMsW8bKIDb3WsRps9FZjTdBOK2BAYPQEHmmo07PuRnLy7qcqN0U54W742QPhm5iRgGYBTpmgnGWW4lgT+ZYrPFEE5/6jNrasRlC8jk2Tm2HTDUni57DuazLMD3JuK6+bH9/mJca7kqR3l8oBl8KARcFxywD47BpogniFg== 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; bh=s3sfvSa9FNN43EaBXD5bx+2QrXXHfMA0FffPrwfLNU8=; b=Y67BmA2z6VQRKy5Hl26NY+wQgGQMXhOc2mnzyCqQcwRyCtIvJiuTqAdzZUR2whMAKnvo2gRL5OYwbMBEM9+pVf4OPd4CYxl6xWa5FOXNvNoR9ihvkNUQj7xf3rWcdd+MV5kKw5JexU1j5PTgErrqsoGtUDI0Fca8WkETcEFVCMPI0bKojv2NxZ5Xz62pxK8jpQIaGY+kNA4qC67A6qdogrIWNm3q0J4Y5AwQb/kT4mgI+LNrJ+a4X6bOBcOoRm26MGbI72AG2QPE1OYzTAsoeYUkt3WMUfRaVmjZYLWKIiNJkVUTRomg27VqBfAmIB8/omxExqMtYESD0Y3v9HCddw== 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=s3sfvSa9FNN43EaBXD5bx+2QrXXHfMA0FffPrwfLNU8=; b=Z99VZ1Qubu6kFNcSZg/IXRqjEAjly8pIMx0fT3aRkzKqN7y55cj5UIchPduBmhq/iXWDra1xfpYKGGOK0sDD23okg2TnkALOZGK5Rlbr/OnucbsB2W5AfkyPfR4W+B/i2ByJOL3F17t4DEYwnQHYaMjkl6t4GMq/wLSY4hGf7Znp9ZtART10IbiVuGXF42j6MkCLa+HC8TGe3dKexv47+Xh/hwCgOMU44uIGCQHO8gWPW/dt4lXTt9NhzOtd8ruevf4DRSUGlHKBc6/TBU8i8vx064jDhWiD6jhS6Fhq7Ln9+UXJSRERdZuddSSNUKVNNCeTGf8kFQ+BGnmm3edD2g== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB6807.eurprd03.prod.outlook.com (2603:10a6:20b:23f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Thu, 23 Sep 2021 15:29:47 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:47 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:52 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [t8NGlwsYfkal+7o1a8WnCSk0uitf29eb] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-16-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c026ced0-810a-4d0e-59b5-08d97ea6fa0e X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWt8qMG3IjM1pM+gnFiFAdPNLWiX7AO1ylHm3joWEa58lx+eyF3fIRKpwIZLmr8nG8QPuxR0sh1461QLIiVRMzPcu0NjY4e/1xEK8YMcsPXnRIuiV2w9JXcsY053cglGDkdRdb/R1wNJp6v6ee5NpLXOIX5/GzJeJycBKlRJU/9c8CW5zKeWxjOdqhEfFfraR07wkA1zkgnjJ0Z2u3Pm+YEf9TRkSJSKOiH0bDSwik3IOqubRxMnWyFQCkp4oDEAqnlhMn7cYlh6FhyeJhjruL2kAI/wB87ZO5euhq8HIxZRvdOvFTYzTeH/ixgGcdpJndSf9rPfSMamsaVqFiTCHQXsw56Vifu98fM9/8FTmQl8eqX0/RQAUygAl3OC+HeOOJXOGTicMiQBojX9O6qeSka9Eb9ys36KxiB+qp2ZG4cs8cBpDXMMSPYMaVJBJHCV4rXwTguzdt1ACPYOhNxa/hudDz+rAEQa5dUKbaF8SkgWUQjJQ1ryRxSgABB/S+6yQSb+vcll/f1rPHAF1sqMGsVm9k/R42NAnsMfv6fEiLR8U29UXMfG7d/uGwKhiV+LvFbeF4UpMMx4iw3X2LaDEsc5WjB2QOmJ+D2goUpM2QbmYE6v2yUi4dcTW+xLs4HcMFrgw1TLjLpheucBuJXWZSUIXOTLb+4Mxta+Qf9+4M9eRJkcZSGErgGoF1LglB3njil7y8Eob1nJ9IR6tjieeob4TyqEPZ5I8w= X-MS-TrafficTypeDiagnostic: AS8PR03MB6807: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ci4ly4QbNN9mKxfRmcgtKA4EQumrcF5tHgjqlUk6kxt2gLJsxmYiZtP2O8J7eeKoMlFzEZPPYXRBzrQLX2LHj47so7Ibf8VINsljIdoYX9ThjBNJb8FfFMNG4VAlLRnvygZC4rPla1IE8aGdDB6SuYUJBF36VrMcNfnSc7u9ZByln5j7K4qBZ12+0OcOqZcs3O8K13Y7wjhvwUq1EnX8qtBrNbc/cZu03csiCvyvqeyE8u/WwNRQQ+pCq3rTxLnKhqf476kTLtcBHqxj4+O86HMgf+/lIQgJQtWKQjXC272sjtEUUHq2Eq9spqzjM9ZATi+s5U+XdGuAaAlpN1U/DN0Y/jH4hfj7rWNctFwGYty+Gitu2Rj3pypScgRI+a3pvJccvZv20pfCmCY9AsX+fSqoPvxqCbj2v2Pgs0UoCENwPqlGbL66SAfwhbxX0k3u X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iydeYRcseri6OEIaxsOCODfBm3I6DABoJiXsYNo6ut+HOtoOu4jBVeyyhekxfd4aP2UnUyyyG9a2mnrFdPjarH4GNqt8l9nfOHooO/mUnMQ/YjTl3bpuIhmvsZ1/apaVui0qUZ5viCOck7uqVhb6jA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c026ced0-810a-4d0e-59b5-08d97ea6fa0e X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:47.6612 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB6807 Subject: [FFmpeg-devel] [PATCH 17/27] avformat/movenchint: Simplify writing padding 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: JxZS4vkWbzcq Signed-off-by: Andreas Rheinhardt --- libavformat/movenchint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c index 47276091f3..35212f2c5d 100644 --- a/libavformat/movenchint.c +++ b/libavformat/movenchint.c @@ -260,8 +260,7 @@ static void output_immediate(const uint8_t *data, int size, data += len; size -= len; - for (; len < 14; len++) - avio_w8(out, 0); + ffio_fill(out, 0, 14 - len); (*entries)++; } From patchwork Thu Sep 23 15:28:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30508 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a10:ed07:0:0:0:0 with SMTP id jg7csp770426pxb; Thu, 23 Sep 2021 08:44:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4+cpeI3a8jidDrPqC1KPn/U+oKwA6vt4UgRR3H7Ebx9GeM7/ApouiOlK/HOaBqh7Lym2P X-Received: by 2002:a17:907:784b:: with SMTP id lb11mr5813810ejc.307.1632411880963; Thu, 23 Sep 2021 08:44:40 -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 d11si460069edm.533.2021.09.23.08.44.40; Thu, 23 Sep 2021 08:44:40 -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=InmFEz+V; 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 A7B0068A473; Thu, 23 Sep 2021 18:44:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072087.outbound.protection.outlook.com [40.92.72.87]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 400F068A473 for ; Thu, 23 Sep 2021 18:44:32 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EHufMZ2w82xo0iipzSlW4EAU8ukkNbZZQOXsQ0sZRrnvhqIS/ndu54chIQxX0nHUdpnlVC+oV/SLgz22OiF3j9QI5T5Qrc37SOCaI++4tRnEORXEGEJ4EedpFlUogKIdAy7cv5UjQbrjsWJvP13iLEzxkGFeSQYiVlt9Tdg8pkMN5VW4J3gQ02go4T+KAa0cbNziemfvoZ06xjTLapQhPcSBoUdfi9MZ4q85gybvPyeKltByZjs8PwJSqu1Z4/m9Aj57wtpfeV98vG8CgKI0SVnZIt8BHyatm4HQiw72wtqTeXcvrJrHpYgy9yxnHylRnfw7D8lZof/5nS01OruYqg== 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; bh=aWy3jRdIsZE0YZoYzVYve/ppoBL66bF/D/PEQOMsi4M=; b=I7xMpuHO93/aODy4xEG8MED7odsOeA/3DtD0kDAMJLYNiTUAel1iyOYmgkoBtSMQ1Gf8pFh/9vMl4V3VEXNyfKzaqCsAfrVQCfmBivwqahJDdKItEf6X8WdVRKHK+k1BlXGRY+pWaIFVIa2HSrsqcRHSCgt8SuWyyTkiIr3YW654depilBWTjfyjs8uWUYSDHZD+Nuft9/Fn+g3pFlNzd7QuXELTb6M/f8IUxwJl4POUHJ3aOjL4X9RZXDMqPhP4tgW3ssLE8GHDVmO0XLdFHNxz7hPa+uOIXVwtL70Ijn/vUR02/4B4O/Pt2p7FpjiXj+LhIJdD3TortrFHOG95Jw== 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=aWy3jRdIsZE0YZoYzVYve/ppoBL66bF/D/PEQOMsi4M=; b=InmFEz+VUQBTofqKtB2SFedijzWEfeg5B7OvR99DV7JuofNS/D3FWAlHgsEKb+LUW3k+/c0UsnIBe59l+VBY0UQUI/xONR4XfPYGU9M3ZOpVswD8FS8ZsLuG8UPHQGvFGjuNYOEV53LS9E475xsenH/8DN66GmXKvdVxfmVECGBJxcwub+tQdf6y8QfuUPn6TDFgyZnnzt3jqgPk6XpNuKpE36JY4RSjXihXnEjimBWxL/64gEyElxh+7AjyTXC4kn9XSIF8JoetyrCukvGFdSI6YG9ieBTRaQ87DG8jHJbQag/uNeRN4ZOopRN+r6IjhmNHmXvp/WKkD9oYzZ++Bg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB6807.eurprd03.prod.outlook.com (2603:10a6:20b:23f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Thu, 23 Sep 2021 15:29:51 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:51 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:53 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [GWfUyzPAHeVnzZ9qYbXjda/urk0w6NI7] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-17-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d83d926b-a755-4f24-0f3b-08d97ea6fc30 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/ULYlaWyz2NXCnwh7EnrihvqGufeKxVO60j2rQeRVQ568TZ5x+1A5nOydWoSbp6n3l8dEYHHZeoakOzZmek4gweF8GY48CjPkpLNDOiAAxfHofd7cwip+Nx1sTJeOrYXyJLMOyAa3trMxVqdV05oZy+1ze4xv/jJylcwA3x50JH0OpXnjNx6zml/SrL41DxECMpogU0iLTO7aNB6vhLF77qlId4R0tunMD9LFe/1UJo7/sqeJC4de6SgGGDNxz0XTVZR1IKX2F2Un8Hk0guNYa67b4+j7w/qIGJJGjYCOwP+1oA+WjfmZzXHReMjEA0UOJ7cooOl3vT375e13k5Mhx2CkkIeQbxzhQhLuX+rjZFv5SWiYROJmLENg/SbRz6ggeZ0AWawmIqWied43wDAZZ9uNmLd7dLxLRGoyfXUVgERe6OZ3LcHAS97Fp51Su7qRtkFSdp2Qucd5IVHoNQ/antXkxDhCadVyZHErvJXUh1TBP9E9AFeFbNSSu2OSOxgUehjg+louLDNNyQcr591CH7Gc08qqU6/rGwnYceCpsa+iuncbadBIiVKWpkEk5lGU7pWIn8Sv6K4BDTXGWDqcAeedk654+B8AqHlEevQnIiF2azmPWIntmd026R/lh/urELCKgX+02u5jDun3hjFqxP9qDYivNbuRQ7GzgIYSk8cOwVmyHmMHq+bF+jR82lM/LwcxBeyYrwB4Q== X-MS-TrafficTypeDiagnostic: AS8PR03MB6807: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nBbKQTIc6cWVCOCoPBI7U0gX8ptMY3CvaKu/PCyj6GsKU1q1nmtNy4BTcFLFIblyE7yUn8ErNKXW+9Txcx9FTeVFASM+O+WAGfkS3K8opRYuLWaAWApS1JEuznJwCnEnO0CZOT3FCbeluWDPJsxhr6/QSYg+rv3VJPToO8qK5qEaLVZy7txe7okgrRFSmpiKkZvnTOO6kErA32zBlbD1O2ZHYiDbO7ekQOlueybv4Ypd+Ufja8D/AX30kfV1lWnSEnilQsH6ofDOg7F3HFX5rcTprJdgktEfk9SheClJkgmfh3rKZmTKkK97FinLuw/uvsQohwBvc4szC5PHZiAV8hLD5XOgf0AbLhRx8G7ll+FrEx8vDmbHK8yGys+NZD64AiT8T53jVcOvkis4l8iO6rXthlqqmzZP+7gWcOMHRIvOEjibh4KJdaZXh+jqmY0v X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VA/yBVu4F77yZ35AhjUsHkw44wnZRdZSddbkEqVU2YoMzDyPRZiTE0P9WgmhALIIEc7jQiFH78OgF/qLK0lCHFsP22TJzMNq6hCwOq08RXobXnX6TO8Vn5ShOJj0Sy8LDmc2XFYCAvhbBDXndElopQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d83d926b-a755-4f24-0f3b-08d97ea6fc30 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:51.2226 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB6807 Subject: [FFmpeg-devel] [PATCH 18/27] avformat/asfenc: Simplify writing error correction data 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: ioS+I1yguaXt Signed-off-by: Andreas Rheinhardt --- Equivalent to avio_w16(pb, 0x0). libavformat/asfenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index 07588772c6..a0510df7dc 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -838,8 +838,7 @@ static int put_payload_parsing_info(AVFormatContext *s, av_assert0(padsize >= 0); avio_w8(pb, ASF_PACKET_ERROR_CORRECTION_FLAGS); - for (int i = 0; i < ASF_PACKET_ERROR_CORRECTION_DATA_SIZE; i++) - avio_w8(pb, 0x0); + ffio_fill(pb, 0x0, ASF_PACKET_ERROR_CORRECTION_DATA_SIZE); if (asf->multi_payloads_present) iLengthTypeFlags |= ASF_PPI_FLAG_MULTIPLE_PAYLOADS_PRESENT; From patchwork Thu Sep 23 15:28:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30498 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp568424iob; Thu, 23 Sep 2021 08:32:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbiHPkY9D7bpAWYbf4ThVT5+U+ZPtVyLgyNM2Z4xKglTlyNqzsYLxdCDfjecz2qABnrdtj X-Received: by 2002:a17:906:e216:: with SMTP id gf22mr5473408ejb.357.1632411148174; Thu, 23 Sep 2021 08:32:28 -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 f13si6328347edt.55.2021.09.23.08.32.27; Thu, 23 Sep 2021 08:32:28 -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=jZn7IXAR; 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 3033D68AE8C; Thu, 23 Sep 2021 18:29:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073031.outbound.protection.outlook.com [40.92.73.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0174268A878 for ; Thu, 23 Sep 2021 18:29:53 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lfD1HpqK0xxKNk7ObYKdp/N/QKWZ7XxcqXIsfB4ow9BWM4edOQIGmNoQtja1tnhv6vnbwI8/LwCSpIppVqqE7PN3sdhcBhf7F96x6dNPOhq4U203dk3K4DWeNO+eAaqxVs2yNmyBeK1DGVTEF6SAOEz49iBnDLongnTp2FKYoP4dURKHggEPw6xPpof9C3loTWuVee30iO4Z/n3N1GR0s7kg6FFzVzcJrrLdjDq7xRzqUnZD3+lG9DTneaO2r6+8RbNojkya7z6A/DoBMY+04y3y7IUQZN2t6d5E4wFbOmrn9m0D8yf4uSMD8GBH8PmwgwFHscsg/e86JJPOaOZXfA== 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; bh=Mmxce+LQrYcukunQQEq70k0GuK7WhZU37kPYWRuE9+E=; b=RakotmfdgpV/lsy5IUrJdvpHEctab6lZ3M3kV1dKSlw+Wx5st5MZnpy8wLR3ksnoTaD1zlnWBRmHhLhU88liGNMR76fHBBSbapG9L7TNkG9/gB8ArJwS7inIg2MDcFXcBY33pNapoUI6OfwZnU1V0DC9Pc9M166370QPeS2veQ5aVGjudTUZWtolfwtkY3ud2IqmTnXBR3+0aVlD35X7iVWmFm9UnVcYwCHCzHk4ny6QTxOAUViSK+4Qc8hhlQyjJxh5/WccNaeQ/s6rexVJoWGCAxbY82zBQ1io0CpsvcsoTqmv3aGaakIiqmwWHWMEGge+HGrgCCyRcoam5RjFKw== 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=Mmxce+LQrYcukunQQEq70k0GuK7WhZU37kPYWRuE9+E=; b=jZn7IXARclpZWIMm3R2jCfGFpFZjNV05ieo68KYxThfZMbKF+Q+dRW+sIAyprZ8DfYTgMELSid8dB1DwB79quovdqLCi7KMJGvBsovPJ5bkn9vTzUOnVNXxoM7aVQqpm8bP1SMXFrdg+xXNOEJ5cxjg4BwRFhVhlDdgMCC9sIUTzBL2f4n4lF1KaKdZ/CwG8be87v28tO3Rzyad3YriBycNY4xWuF6zIBlDEo2mumog1alhaMP24SZ2RC4LESYs7U9kYPf7e5TxWY1T4LYxUDenuVRcKyyuT7ZCO1LjRz/uoz8tni/4gP6WwdK7GDKnIXit3ZvUEuU1QUuizTl1mcg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:52 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:52 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:54 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [wYzHJ9xJtBIVo4BFPutJziB/MsEhzkVQ] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-18-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d826754-42c3-4f08-8680-08d97ea6fd0a X-MS-Exchange-SLBlob-MailProps: dEG5jEBie8kruybyFJSRlq7d/ZVi26LFqo+SkwSTeqrBo23B1/ubsSkVUDTA1QbJl0hf6QAd27+1DInmkmvKFo7V0OEWGgYsx4qsQhcY3fyp8p+spA5Xa8pphTRPkwpoBBWOobDlAVAHKzqslyCdbw3PZv/NpLLG3k9IW1YonlpCDjC+0ccfnos9G2iMgDJVSM+W6tCxPOv3N0L95AlK0agk9/xKK4/0S2g5a//6WzFaNIp5diJ4esN5IEnNA1vHBF7xNvUc5jXv3UrQvVLk+3ah06YEYguxJt3QqtRY7A/wwU8913hejwCQ1O60iuyQdznvVq5sgM7yA1mkyruvAgtyCr5DPvxFNnHT/QeWravgpgcmV4XxsnGiNiVrsapJ3YKzFiXtEYfJUp75MnyAvAm5rHbrn4Zrv0OUa2R2Ymn9xDaA1FSckHCmfQTznjCrqhI1YPQAzXk0bRoKi8+lfCGeOvP0slbNQXpWhA8VFHuA1FdDxZregH25pxSleFmsBozfckyYE7KaDW3XKeusnrwtYTb7/ttpN9pruo1gcg+5o7eHf/beJigEOygeZIz0iq3j0CYTxFJI1G0y7f1NOorjxQQJIlpRIM9hyyQS+lr4wXcWqmeK+oCYc3R4LuHKy2wUiOd7yhNN3A5VhqZnFxJxXx8d1MJ0KT9iZhOluCAnEAxqJzDSaQ== X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OMRvtxkZpOlDVE0ShR8qrbqYFbuLBUmIOjSxM7oPh33bLtl+krMgXZ0Ps/RD9Xlq8Dhi1T8l82qDI7SrCtldqM0tg3BJzd4o2Y+/khpPgznPFL+5bu+3hIb8xqaYSL1ymI1JKWkidhPpjUMxVfUhyKq+MJB4unJtePd5+R0TbPm4K1UvzQIUsDsScnYQPtshvRzm3uiZSvtJr6OR4wOtGYe1M/sWWhwjwJiA7iyP4M40SlZZSMc8eqcvTOabl65km4Ph4pKyG9IRdUkvpCjqInzCcRx2NN2xlddP0FC9KAQ5L0duYNpLJj/sQHQVo2QL6xv6cmQ7kO5sgbhfbVb0GHyp864c19yRBfaHN0d1hWaK5269iUlpt9ffh5enx3Q9uKWYU1N2ZV5cri00YtHaXoTPBxhwV+9g6rXBWwNKHwRaM/9RQGCIG9P3Spo37Mdm X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WsaxLEk6qji17vsrq6snp473z7S4B/sJ/ek0K27994YhFfo15tuq3vO1pEmRcpbInXBf0tYcXoOcK46JwD3I3EaO0m4FTKdqgynOKAnilJIgJ2nl7qfKjGP6GQG+H1zdW4XrLC1jXgDFeTEfg3rejg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d826754-42c3-4f08-8680-08d97ea6fd0a X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:52.6742 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 19/27] avformat/riffenc: Fix indentation 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: oPcjgWsfc5Y1 Forgotten after bf9a8d183ddcc65b5ae473bb048a3d38bd6df9f3. Signed-off-by: Andreas Rheinhardt --- libavformat/riffenc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index 43c8bf957a..ffccfa3d48 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -191,10 +191,10 @@ int ff_put_wav_header(AVFormatContext *s, AVIOContext *pb, if (par->codec_id == AV_CODEC_ID_EAC3) { ff_put_guid(pb, ff_get_codec_guid(par->codec_id, ff_codec_wav_guids)); } else { - avio_wl32(pb, par->codec_tag); - avio_wl32(pb, 0x00100000); - avio_wl32(pb, 0xAA000080); - avio_wl32(pb, 0x719B3800); + avio_wl32(pb, par->codec_tag); + avio_wl32(pb, 0x00100000); + avio_wl32(pb, 0xAA000080); + avio_wl32(pb, 0x719B3800); } } else if ((flags & FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX) || par->codec_tag != 0x0001 /* PCM */ || From patchwork Thu Sep 23 15:28:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30506 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp568562iob; Thu, 23 Sep 2021 08:32:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgC9Vs99Z2pgcHB+SwRmle6aa5zkHT9Fci8CeREGI0Y5a5vSfeL/Dm82DMrgzwtavc1FSl X-Received: by 2002:aa7:d7d5:: with SMTP id e21mr6330629eds.27.1632411159773; Thu, 23 Sep 2021 08:32:39 -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 qt12si6535996ejb.538.2021.09.23.08.32.39; Thu, 23 Sep 2021 08:32:39 -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=hDyb4LXY; 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 EBA8368AEAD; Thu, 23 Sep 2021 18:30:03 +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-oln040092074100.outbound.protection.outlook.com [40.92.74.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4C0C468A71F for ; Thu, 23 Sep 2021 18:29:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z/7HCSYDpeHLJxQM9FDs8SBt7JVwJCbmUuXQqB0wN9xCyzx+aSo1sI3ZJGScfP7O9VFXk4y4FH4Y4lg/ozOOR/02GqaBW2l1q31PeUqeTBRtczoirFP1O5Z8tFPhnst6pGVABFtgpOrrTUagq6MmxUMIeCCi5cH7TmLZOrj5xbPyWsxA3NPhcALOLI4+MGu4z8Jcj5cWdPXjiq8X2aniERPiSPsgFXpO2MTZN12RWMrGIO5a5fMQEFi0NPu18PAMlgUMcu7DZHSw/qURuRzz2Eefg0k13/fWt/vSl7sCPBQCb4bdGjxmahWGGr8ilh2dc5kUmRAY6MsPtwqJ+4rfXg== 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; bh=8fEWgNcnYBM1yA47dPlZG5piyunP+rdUfSFjHRxIAhU=; b=TQCtqbW6mcsr6HR0Fu+Bx7K1KjQNbfsRVaGoBog3HVLocmbzThM/szKJ6Lu5uEbH2TRD93fmDdC9hTH/uqnStW+3uDze82+rf+r2icqlXHplDZXHOdHNiS0YSX34aUQO+dhW9hd1fnaCvsv/lM1Cc150yAsvjN0QEdfnRhyajy5p47Wkh2/elnEXQypPtSbYrd1HnIjW7MhE+bvAdDvv5dCIhx4Opfip8jgg5z222tHq48VD77rtFY4r/QSqN384RtQZQ84WTzQ45ugVBfVBnWdCkVMsFAWQ0cr0vjDotomA4SZuCRSYRGXQI3BWShPTGqj8p6osOIyI5c/xTGth9g== 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=8fEWgNcnYBM1yA47dPlZG5piyunP+rdUfSFjHRxIAhU=; b=hDyb4LXYl+TITPdgV8DdKpwHjIDofwjFMXv6VOVLBzE14HSl7EsuPZENOBxg9kmsaACVYktD0bTGrGKYkvWuDt9Q4bqEMsJPynydM3lfvjZzFzjAZGHgv6UzyyXgNYSKddNzVjEBaWjJDiRFzEldKhryTbq3J2rs0EzQowK5O3OnXBEaqsmf4P/tEX4ZKIQncXVh4Te5yoS6oqnys3NtpJTLEKgXxKZBCaN4TBw+obY9qnaa22iiXBtJfmOeFHQZ4Syoc5YHDjjB5Ddp6llT0xakydx+KFVFFWryVaBxQUE/Qa5lT4DhkiWMPu9GcUZ1tnu77yz/KoAGqSru5wd9Eg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:56 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:55 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [RaOlFcsPohw5pwgRPUbjapHaAVPnclUI] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-19-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 322bfaeb-2895-43af-7716-08d97ea6ff3e X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSimr+leovb4wQ4oQcDUYKFYtLh+e6PQyl/ISdGxa4kHrBXzftAFnE2bcg0u6PUdSyzyGlukY/en0gWgnN98BnbTa1y7ns3CNh767S2p/d8xv+2wZ9U60jUprnYHqwSYiZf8NF8IMo1C+KLvD1eazNdRsYwrcBvxWpitmXP57f9rPYGNkoXzETYMnp9RThSv+zZ/rT4ita9GfyA+dQGGWoOkCWinWEXQPAjOqynf7KRJ6AoOdcF5MoJ1dveWvZ1td66Ofb5ihw3bprHrbX87cLuPVZQiEoqJRGIt+yy8WJfjfT/JytfvpWJRKZ1I66Gw2EBFYKB9n5Kkt0NpKStVsQkQnFfYpTtw13GEsLlqHDi4MZcobKruI+AX4gIJkwOgCA1UfG5jrOYQ1GVEV7YR92BR2tjvB0R9m3vVJrQl4P4YqV8iAbauzQppcaKgOdpkkgKf0K4Zekn7ht6c+zrMm+6Xn1RgD8ffW10btWSg68JStYEn9mwAkvtA4Dg90Q1x3WZcGP5OYBVCTOfAsISeMsYJnxFpy4+vBPuOd03KmYyE4OJLZPDqZ3ax76cVKMg4/k1WxpOIAO2Z3JtTKcQdOsM6o7cFhh1N7zQEIC5JGz9XWGLDfNjX3e3Di6df8hhfxesaY7ugKKqmdri/VAKrEXxpNgh0LjaVhqpEaDSaAacpjxLidsUxI9leffXxzKCKfuqYuO6XGSHkTlkJNFm5rhjy/5ahmlr0OxSw08OfVFTfc= X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FtPvfzRrW6Ta78drWxvVDx5yBg48Y8sczzl1d9JwWCe95eRt29ACEKjIF85qnMwP8c6ATWCu6sAhC+yuut9Za+JJKuAoFgbhdSExYjzGNCDdXuoHyjtvlpIdtbPDYPTO1Okw3dPCAsDPOsxJ+NxSoMPLJWfM+tnH3/r5JVNKro9ZJhtCTh8c4dHHC7eG2+u1iRIEdCCD9dUCL098xojmrB7NmakiNP7RP9BuYdwy1g6VqlLyopLnL1T7398NQeDt0FWiNiPwRiviKg5lJjscA9Rq+ripHGHL7DqcvYGI21A+os2GKlLZMlSYdYu+7rIXf2p4YYQqPEUiOpubAfCTbIE2X30gwYyQww3aPxFRyTaoWgH6p/Fk2PqX8wOCXccQIZLXsB24C3NJtWsf8QD6bcekWkgNuOJj35UBufxABlBEAbdQYvhilNupBJL2wd7j X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bBH2mE8np9Vh01VUyt69aTAghg6H+ZfYK0g1JLA0z1ZwVLijJz1oStEWEs9IvmVAbA9AoLHrnog3Hh7VJurfVcvFnTU/9uGfAQKl2IqF9F+J6v5W04YUeC1nYeG8Ymo31Eps/rowblSs6dnasKynCQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 322bfaeb-2895-43af-7716-08d97ea6ff3e X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:56.3661 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 20/27] fate/demux: Move Sony OpenMG audio (oma) test into a new file 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: MBGfVfkNGqRu Signed-off-by: Andreas Rheinhardt --- tests/Makefile | 1 + tests/fate/demux.mak | 3 --- tests/fate/oma.mak | 5 +++++ 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 tests/fate/oma.mak diff --git a/tests/Makefile b/tests/Makefile index d5595908b8..1e0345b163 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -173,6 +173,7 @@ include $(SRC_PATH)/tests/fate/mpeg4.mak include $(SRC_PATH)/tests/fate/mpegps.mak include $(SRC_PATH)/tests/fate/mpegts.mak include $(SRC_PATH)/tests/fate/mxf.mak +include $(SRC_PATH)/tests/fate/oma.mak include $(SRC_PATH)/tests/fate/opus.mak include $(SRC_PATH)/tests/fate/pcm.mak include $(SRC_PATH)/tests/fate/pixfmt.mak diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak index 20aa90427b..2c508a42aa 100644 --- a/tests/fate/demux.mak +++ b/tests/fate/demux.mak @@ -103,9 +103,6 @@ fate-oggopus-demux: CMD = ffprobe_demux $(TARGET_SAMPLES)/ogg/intro-partial.opus FATE_SAMPLES_DEMUX-$(CONFIG_OGG_DEMUXER) += fate-oggvp8-demux fate-oggvp8-demux: CMD = framecrc -i $(TARGET_SAMPLES)/ogg/videotest.ogv -c:v copy -FATE_SAMPLES_DEMUX-$(CONFIG_OMA_DEMUXER) += fate-oma-demux -fate-oma-demux: CMD = crc -i $(TARGET_SAMPLES)/oma/01-Untitled-partial.oma -c:a copy - FATE_SAMPLES_DEMUX-$(CONFIG_PAF_DEMUXER) += fate-paf-demux fate-paf-demux: CMD = framecrc -i $(TARGET_SAMPLES)/paf/hod1-partial.paf -c:v copy -c:a copy diff --git a/tests/fate/oma.mak b/tests/fate/oma.mak new file mode 100644 index 0000000000..977dbd5c32 --- /dev/null +++ b/tests/fate/oma.mak @@ -0,0 +1,5 @@ +FATE_OMA_FFMPEG-$(call ALLYES, OMA_DEMUXER CRC_MUXER) += fate-oma-demux +fate-oma-demux: CMD = crc -i $(TARGET_SAMPLES)/oma/01-Untitled-partial.oma -c:a copy + +FATE_SAMPLES_FFMPEG += $(FATE_OMA_FFMPEG-yes) +fate-oma: $(FATE_OMA_FFMPEG-yes) From patchwork Thu Sep 23 15:28:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30487 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp568753iob; Thu, 23 Sep 2021 08:32:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxtjzC/bJRse8JaqWsARmv+TU9mHRdWf4Ba8Aeo3YIZX2qI+NMlmQadtp3QIvjY5W1z1AF X-Received: by 2002:a50:d8cf:: with SMTP id y15mr6237561edj.66.1632411171467; Thu, 23 Sep 2021 08:32:51 -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 6si8059285eje.339.2021.09.23.08.32.50; Thu, 23 Sep 2021 08:32:51 -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=m64Pg7MF; 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 E6FA668AE57; Thu, 23 Sep 2021 18:30:04 +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-oln040092074100.outbound.protection.outlook.com [40.92.74.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7B72C68A71F for ; Thu, 23 Sep 2021 18:30:02 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CG0BQWCfeanHxl9yfOuSRRQhge4QahAsD2yAzSGhbf1aNMx/+nl9ppPfCbGYdNz8NkhXCVeMjLVFnV+/1PmbKET1fVW4tS0dQqtgUP3cTUt9hXl0f6q5zJjzuviRSxzuzf2N0t0Hoq7OP1/he7dIoDsq0Jaib2XlHR8/AsGR53gjDCZJK9oKl6ZoCKwh23kemdFeZTzmvRsCNuItSwwlwZ800pbkpXp6tHY36XI2Sby0pg05mkt8BeDhGKicDL6GRtYgQTbtm37JysCRWrA9noSDqvyn6Rez88Q8nUhXbdnJAScYCmCW3Yegn4Jg9e7sA5rl1SCn/xDeLS2ocCyzAA== 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; bh=5bOhvpSn9gYttTDqqn/g0LRGYs+Yhjf0GayKP+IXj8o=; b=Gb3EHAG9013M/vM4bcdyDtkKWRMVv/RGoJ8Js3vH96y1fqx+Apt6sSw4xiTJSbDnSR3rg/bvyLk9Vin7YniwFvloAr5AE082goeFJrjZGiYiodn5Y1Z9nD7ZjU9363Kr6RJ3J6rTpvYgs47R6uX7jwsyRW38zfMciOBQXWJNqKhmH/sztMNYbeBfc9ZHV6SULrHnZ458pzqjV/ZMc8SpUjhG4nmLE3W/b9aLb50A/u867+9cmR2Q2NJFP9PSc/v2Qh0c9ADhE8fDOdSOaOQt7k+G6oozfqCv4vBQnfXUEmk8MoN9dIZscZyO2PNfu0TfS1typNJG5PKiufXm0dMEnQ== 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=5bOhvpSn9gYttTDqqn/g0LRGYs+Yhjf0GayKP+IXj8o=; b=m64Pg7MFHpS4WQfR6liHjA325gUcuCrMcaNtQPz6OBOc8fqRJR5T3XIA0pecVQdmEmyksMgJotYogBTrPjQh45sSOupQqJtHilR4Rx4KOB0erZN6KetKC86vW/YLedoR3LKcSqpALptX/M7GSUfIy+m+2tVqW+7olOS7RPbQKglfSc5SCFLMSdORahjeKeANGI/zsX8jBLpivrZM1155sSQxPOi4qYDIcYP8AH7JSDtMPgsBL9cUO1uCaqDWHO1MxXmtEFbfnOxQ14HAKw+3Fx1ea6YdXdJGwJgCyYSWZFvH4ACPyQD61HOj2n3W9Y1E5AOu4aHpFUX9AZt2A231Jw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:57 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:56 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [DNUzV4ZCFRILk6NefyW4F4bXazJZrwNX] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-20-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1baca250-ec7b-4bec-2f59-08d97ea7001d X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSs7I/smAGDFut8XYEMbPfjKQVpGA38gGiqLEQv4EWnizRjq50Ot6YvCiozOrYg36JHGHsPyqzb70t9a1TTBwhpfvSBH2YMVvTvAk7sUksIfR+/WD8D/lNvxPntkIL7lguIov5wWa59e8+Wkt19iN3Vr44wreSNCL4+TckksUVvbKQF88ynJQRJXFA3ILv21jxGrKvgyy6EWAHw0zt68ujXoFW0U88EpnW+UZCUQNA67l3mdKIoR0oV0VGdZoOYdj42jv/24oReM9C5WOLdlGeS1uNxBT4JbkOSNJqvp0akYF+e4aIWQ2rwz9I3/P8qyRRZ5qv1B1l30HyW27yGOV/QCbyB+HTp0QO0f9GnjBO+b8KTkqOLQE+0QaOb5BfqQH+jruCnUTmeRQ7K90k2gc2uwZBcS0XSEiP2aDw4hO39a7PisTRaaET+7PoDyPahYyxjiTg9R59GTJ39Y/yZZpLc2DBcnFmA6mSAlLWOXix9pYVINKcn4ovbEvTupG1uIAjra6624oJntfWF6gNbnOVsZ/TfPSlSe9cltkXXb5ZdqiBxG1dfePffYD2KXLn7i1iGouWisEa7OoFhRCQW1hSKVt8m8Lz4m1cPmRmUq6m64wUmqexCeQY41LiKr3LSSceBP5p5VqvGK7ZnNfYdHvlOBA8V/G4EQ6gQ+ZBj06VwfvoJSjk1r4EgyGugWrdyAFXGW+GxMPm162BM4mFi3kJSLE5xTwhGwQhjjfJjiV6EYs= X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CjRT1hIQ+3QQCt6xpnvXO3Gk8oF5F1ehKkBt9cpne5k+DSomxSi8pXfI6TBBPu0WRwfkQf3QUuLPYBLnoxM4JxGefa+Zhf+01aSkTeuNCT8FrE7JHCx3OfFUm31UbgPt+MzAC3Ko+YnNXcNqsBwJ9KMdf4l4zQap4bxmoV5Xn52qIKHkaPFJfjWXH9E0t8jo4ZKc0gI8UfZVMyBAWRUR/XKjgUUekPhiwo/6QlFIeYWb72hwx3g2AyWDmasYW6d5vhE6NMVENdDV6lMEaHwgAPz9lPZyOl9up1Plrz27r/INKp8D44AsRPBvQTlzFVgeGyyGRLUYp3jaJOqz5f5Zautegsu5BBXuPDPxi/8wTIxgWoYfqfB2mUbswWIT5ZJ3ksCgPpLdYF7zH/mfgYKbSyKRyusfMXawW9ygwOr1qpT73haSb3J1zj+m6ta4P2Xx X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: R/dAk+pHyHq/eD4NtpE1Qm6yCeVd7a9fNR1SKFS25YbxalCb6msU7ilU01MOA/gwYbrHo97B5mc4/FkMFm3hlGal58+iNUPsWPDjn2bkoIY6SC8KaKp4QOeXHVEsRyxvB8FPQVK1qHSPAnLY+4nwiw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1baca250-ec7b-4bec-2f59-08d97ea7001d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:57.8197 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 21/27] avformat/omadec: Don't output uninitialized values 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: f3kvluB+24yq Signed-off-by: Andreas Rheinhardt --- libavformat/omadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/omadec.c b/libavformat/omadec.c index f6b7697a43..a727cc4d66 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -491,7 +491,7 @@ static int oma_read_header(AVFormatContext *s) AV_WL16(&edata[6], jsflag); // coding mode AV_WL16(&edata[8], jsflag); // coding mode AV_WL16(&edata[10], 1); // always 1 - // AV_WL16(&edata[12], 0); // always 0 + AV_WL16(&edata[12], 0); // always 0 avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); break; From patchwork Thu Sep 23 15:28:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30504 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp568907iob; Thu, 23 Sep 2021 08:33:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOlxktCzrG6EoE+LKQ9hRevsWHJUivlmmv+BKboaQ5H2WJIO+8SPm3McLE3w0DUDYENU7/ X-Received: by 2002:a17:906:369a:: with SMTP id a26mr5580238ejc.539.1632411182189; Thu, 23 Sep 2021 08:33:02 -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 y5si44387eda.365.2021.09.23.08.33.01; Thu, 23 Sep 2021 08:33:02 -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=BaVFJ1Sl; 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 D865568A8EE; Thu, 23 Sep 2021 18:30:05 +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-oln040092074100.outbound.protection.outlook.com [40.92.74.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E57B68AE7A for ; Thu, 23 Sep 2021 18:30:02 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tf17FV2A6qwc7/E39pEd8n0jKdUWSRS85psETksuNZFv7Cl8l28sq/jg9ykIbJfGNJm/dpt0R27zLFHPi/aCnkJ6vjA+AowbtgIgoZbgaU63ZhWxQlIGfLDLVCy/2fis/JL7kI2ZJZ7mSOQAQdXXO7Gu0lgRv1PzFyFg2kw5UKYu8/eaT5NOL+oTfsu7V1BIhdkenoNkcEcXMps7ipt1gBPkJJnX+9fHuG4bvKtZjmwd1/wVmx1aEowYnQabkukx+po6CoCGF9Ey3F+DFBVuPJLngkrEZ4N9ArZ+BmjrFlB32enQ+BUfUhMp1xOhA1RKeW1nqYndQqU2lf8ouCwXvg== 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; bh=tfCA4/HXqJ6Bbluc9/Pyh8xDm9ezUejG72ERC2fO38o=; b=DsW3I+rqWPbgPrcHDptS9iur90ubx0loUxrgeexPwmYAoiRnTXS0hqvUxCR8+2udi3cYDqvqHxJG1tkJxVBYLDN4o48VjPTJsLafCTdKDivlGCEs/MTYePQEP0WTQn8lf9YKHah9WxTgvMS+m3eygqI8GFaiVDYXvNFG4KINWwEq0/qDMYZ8b1a/iIdKDbSHzNE3gXMinoBU8WXJmiAM03soOtzvjbukiMxfZyDC/fHSKA+FpZwjy8BYKkn7n0ukPTxTK7xsEUx322RSAnOxGtKKc/fRKU58lGKGSPY45Q7Obc+4JOl/vbbn/mKKfCe0Gr6LIZnynTUmPS6MPizPhQ== 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=tfCA4/HXqJ6Bbluc9/Pyh8xDm9ezUejG72ERC2fO38o=; b=BaVFJ1Slmat5ECQ3d3kk3mdnPeBcbEvl9B4xH3/Q9XNkfqbqR5rR5aur4pMOJOg+f1my3deQ6DlTakGLClkSsDbz3lkwGwpdBd+Q5bFyVx9GboTrklix/2bMWTLCwtb1ekSe8JjK68n07bcd0RyLwJGkA6HiTqqANYRSmEzIQz0vTU0/anqrZ1BM6f11osZVrC7lLk3ykOFOavI7PZJZEXgxsfX9Kp1eLfhKACEBELL0goJmkOYGnMAGuUMhU1DWfReunjc4SJ82WFG4enYl3aczw2VuEuk8NtF5XF83ElDgfrL8aFfFUTMSGsMmJDgp/LnlcjkB7xRaOXXnSgeFUw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:29:58 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:29:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:57 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [kbohyZ9iarcRqJORSYzMeoKd0J6XijxA] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-21-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:29:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a483b81d-b7cb-4ef4-0f7d-08d97ea700c5 X-MS-Exchange-SLBlob-MailProps: sTyj/kSftouSyK8Ur8NVjbpNS/aEd/pXHVnuSzT6Cd+JcLs7f3angM9rhplilWieGt4m8780m7xR1GPVtbBYw4cOnOrBGow1LyBlMfQjUJpXOc6f7ezi5r51czk5eOTzWTnHFXuXpZlW9Ko1r3LcnA6Xd1QZewDPZ5BCaeAs5Pz69Kr7l8AdwyfzumDqH09hX4lgIClAeFimPT/hQDV5Uog23STQ8GA5mY2Qf6K68TcYVRcDYMp065pC46QIig/mGzffb+DEcGNvzrs7x5I1xFYNtIggj5vVOTczHSMKb4Z4gNpLNNjgFbXRpAwT4gomLvXSICy7aZ8m2asrCDVxIz8sM9uIqYPp23PalW2lswcdBJCTot9cM7p7pqTsl2Tp6tSKKBXl8yLGIY/JRAonDi1w1ET5LPLv4dbzf8idz4Oou4E1dNhpBcneQO1XfDcwY38G02c9U8ypnwR1OdbAFMKjSZ52syQPr6ieG/N3OpPteDR7/06rJGdEofPGc6c0C9w1KA7reGVFOD/+6SSAq/UZByQj3XYitButCegq4t6S49f7z/H8jkC8UAHGodov17ViDGzKpSnrEBOsDsq9HPlHSBYawLGTxMNN/NR7ECr0pk63T+YPl0u2k1v2hvHBx/rfyBcxmatm1Ma8r7LaCr3godkZg0mqCsGw20sHOTbOFNcSfCmuOIWVcVIIVA4JrTKiP4EVmVE5ah9Nm9Hcq9aqrgc3ADadj5GYvNMD575IutVJEqN+fcVi0+FeE29Txf4e3VOUDegVdD/t7iwC20oI8Z48NWJCP0IJg9rAWbZYQPIHk4CKIxX5Ui57coO70KJvIDowoDmoh7rYy6VMQw== X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G6n5pQ2A8c8y5t22S7sY5hBQwVd/FSKKvzCba6WmZcMXvxiG5w1SK7j6w7dma961SXwzqby45+UR1f5NI0Gm5fAf3Kkr0FdFiaUHOUppoHaDp3I07eUP/NMiA6ZEHyZFJGkysVsJCDhb1vpYK2wmT0KZoWxl+mgJZQOaZEGIQk4B49Yo68IGyAAC7A+tAXNvMVw8vZsV75AiRuMi77bgxmTkZdrV+NmxkoCcW0IGsUOeXKoIp3CjXWbHjEvKk2Ku/Di2yWEcD96mIsQp+e0oBo15BlF6PGkOLMwOcekJlxNHtLwta+fCbb/e//uCl6HBZL/VuqQJipqMgCC8Lv/YClmNcjMP6Eqpo5uPmQNr6icJEk88ulONOgwpByuQ9UeJYVLnzzoSG1ZdPKJRYyItactdmMdzX91XNE0svAdRCBU6aPp177WluWVb7kW5//qe X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tx1Cy2u19g22tHupCvgytbjDWrHGTTT9Qcmse7zIXGxWVQf8Z4nc/f3aGocnv17UakWjPT2R9adG+i6q7dMCJ0Bloqpqh8/0+U1tykHdshFphCOVFdURxZ2/lYfcbpTKF18kX/jiRnKkYXO9FOBQ9g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a483b81d-b7cb-4ef4-0f7d-08d97ea700c5 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:29:58.9020 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 22/27] fate/oma: Add remux tests for ATRAC3 and ATRAC3P 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: 3XNnZf42RT2O They already uncovered an uninitialized-value bug in the ATRAC3 code in the demuxer; and provide coverage for ID3v2.3. Signed-off-by: Andreas Rheinhardt --- tests/fate/oma.mak | 18 +++++++++++++++++- tests/ref/fate/oma-atrac3-remux | 14 ++++++++++++++ tests/ref/fate/oma-atrac3p-remux | 18 ++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/oma-atrac3-remux create mode 100644 tests/ref/fate/oma-atrac3p-remux diff --git a/tests/fate/oma.mak b/tests/fate/oma.mak index 977dbd5c32..a088feff21 100644 --- a/tests/fate/oma.mak +++ b/tests/fate/oma.mak @@ -1,5 +1,21 @@ FATE_OMA_FFMPEG-$(call ALLYES, OMA_DEMUXER CRC_MUXER) += fate-oma-demux fate-oma-demux: CMD = crc -i $(TARGET_SAMPLES)/oma/01-Untitled-partial.oma -c:a copy +# Also tests splitting and joining the date into TYER and TDAT id3v2.3 tags. +FATE_OMA_REMUX_FFPROBE-yes += fate-oma-atrac3p-remux +fate-oma-atrac3p-remux: CMD = transcode oma $(TARGET_SAMPLES)/atrac3p/at3p_sample1.oma oma "-c copy -metadata date=2021-09-23 -metadata time=16:00 -metadata title=noise -metadata id3v2_priv.foo=hex\xB3 -metadata_header_padding 500" "-c copy -t 0.2" "" "-show_entries format_tags" + +FATE_OMA_REMUX-$(CONFIG_WAV_DEMUXER) += fate-oma-atrac3-remux +fate-oma-atrac3-remux: CMD = transcode wav $(TARGET_SAMPLES)/atrac3/mc_sich_at3_132_small.wav oma "-c copy" "-c copy -t 0.1" + +FATE_OMA_FFMPEG-$(call ALLYES, FILE_PROTOCOL OMA_MUXER \ + OMA_DEMUXER FRAMECRC_MUXER \ + PIPE_PROTOCOL) \ + += $(FATE_OMA_REMUX-yes) +FATE_OMA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL OMA_MUXER \ + OMA_DEMUXER FRAMECRC_MUXER \ + PIPE_PROTOCOL) \ + += $(FATE_OMA_REMUX_FFPROBE-yes) FATE_SAMPLES_FFMPEG += $(FATE_OMA_FFMPEG-yes) -fate-oma: $(FATE_OMA_FFMPEG-yes) +FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_OMA_FFMPEG_FFPROBE-yes) +fate-oma: $(FATE_OMA_FFMPEG-yes) $(FATE_OMA_FFMPEG_FFPROBE-yes) diff --git a/tests/ref/fate/oma-atrac3-remux b/tests/ref/fate/oma-atrac3-remux new file mode 100644 index 0000000000..fb402c43c6 --- /dev/null +++ b/tests/ref/fate/oma-atrac3-remux @@ -0,0 +1,14 @@ +9f1825375316cb8d6109747def944856 *tests/data/fate/oma-atrac3-remux.oma +50056 tests/data/fate/oma-atrac3-remux.oma +#extradata 0: 14, 0x0aa600f2 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: atrac3 +#sample_rate 0: 44100 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 1024, 384, 0xdfded1b5 +0, 1024, 1024, 1024, 384, 0xd8e3badd +0, 2048, 2048, 1024, 384, 0xa316bdbb +0, 3072, 3072, 1024, 384, 0xcea0ad2b +0, 4096, 4096, 1024, 384, 0x88d7a98a diff --git a/tests/ref/fate/oma-atrac3p-remux b/tests/ref/fate/oma-atrac3p-remux new file mode 100644 index 0000000000..d909fdaee9 --- /dev/null +++ b/tests/ref/fate/oma-atrac3p-remux @@ -0,0 +1,18 @@ +0053481795d07598bf2e7d931dfc4fa3 *tests/data/fate/oma-atrac3p-remux.oma +671783 tests/data/fate/oma-atrac3p-remux.oma +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: atrac3p +#sample_rate 0: 44100 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 2048, 1488, 0x69b7fad9 +0, 2048, 2048, 2048, 1488, 0x3c43fdb8 +0, 4096, 4096, 2048, 1488, 0xdcd2dbcc +0, 6144, 6144, 2048, 1488, 0x5708e4bd +0, 8192, 8192, 2048, 1488, 0xdc7bf8a7 +[FORMAT] +TAG:title=noise +TAG:time=16:00 +TAG:date=2021-09-23 +[/FORMAT] From patchwork Thu Sep 23 15:28:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30491 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp569086iob; Thu, 23 Sep 2021 08:33:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6Twqyp6cLlO7dRLH+Bvn4f88ZvCIFes0NP8rJlzmHeTSuqUNMKAfbn7O9s2sDU2oxZjvd X-Received: by 2002:a17:907:785a:: with SMTP id lb26mr5722279ejc.77.1632411193237; Thu, 23 Sep 2021 08:33:13 -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 a18si5751336ejj.147.2021.09.23.08.33.12; Thu, 23 Sep 2021 08:33:13 -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=f6wKFPGZ; 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 F198B68AED0; Thu, 23 Sep 2021 18:30:13 +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-oln040092074105.outbound.protection.outlook.com [40.92.74.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 63E9068AE7C for ; Thu, 23 Sep 2021 18:30:12 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DQumpqZhrulsocX5r6RxF5/G/F65NLMwbPf6QnDGcOSmSKuq0ZTHhW4TWqpPbbclSRrMrZpZKkxS1vUiKGN1nzlxfmJ7S0Qe8VRgVDuDozShAA6rVKBliUOHvQiMHkMrueZgWr+yKt3cZsv2DagCzbZSBFRYS3nYa/yGP52HNDsgvyHVFVM1wwf3WB6P2vyT4vdrItOdnfj1dS+kz8+OgSRSuJcBylP32UOU0s8i0wJfD3RvpKvwtmHFVYhYFJyaVYpqFqIuPTbiTu3xHlGlYxP3vAIO3qjqxoHYJD2xhmWyBBHGj2WQ/okcqW4wP26/S84pGqxMEu6vs4C/vcIHgg== 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; bh=2PDDXLuMJgQs2N/Hoso2G53xtTx2Hrk7mGUConY/Y2g=; b=mdY4rnb5xYbZAgucOkmkKIaKy3Wm84WSb/uA4ZnvbejxOutB9CuM5hKU5Pz74ei7N8xJRkvE+xPEcDgrEOoYN4iOLI3weAUFI1LL5r9V+s4pB08jToWn8gaZ3KXj+y05gDb/s8++JnJgiIcn66shms+pAGBoOL4UG+pFtm2NyEBGmqorCwHIHO95Gu1yZ6PuQaHlVvmQgEYWO51bMOg/vqkYjD+Udo/4px9Js0CTYKD4NTZPJsuSHQu1+uiysLLP0fbFkgWQd2L3HnvC9YWu9KtUwEm5+NynErfG+EI+DEUf+h0ZSkvs0UpxraTXKQ3qHuEpRLbNk9eXEWgJUra9kQ== 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=2PDDXLuMJgQs2N/Hoso2G53xtTx2Hrk7mGUConY/Y2g=; b=f6wKFPGZ3VQHOcImbZBoJpybtvgQwnH/4D6wdoj5Af04IigNSKYN04cyz0PSX2o8gnVjZwcnAYNI3HPEXWiy/4jZ/+Vtu/qQjo78TY4RV1NjdZ65iQVjIe3B4PL1ImZW5dtEK3Jvj3p97QnxLDIuUZ3dvH1KqEkcbrWRNyXrhICxfpJdq3OPFvuxLitglaOs3UU0AyxcbnK1xQKm+JNqgxBhLO9pHW8OHKkVbHO1eJLH0ajmD6WaYXgRLijsZ5P3AmPVQLB6r5XgBasHnCzME/TP1lvTSOK9LP7QDkEMKBiBcvAZibcbD07HFBvMgbucSFMMhKmHvq09NLZYGHjmkA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:30:10 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:30:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:58 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [A4ekD/0uc6v6yake3otlN9s7byS4j/rG] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-22-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:30:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19ad4a2f-befe-4d21-d8e6-08d97ea707d0 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWt8qMG3IjM1pM+gnFiFAdPVfCiTmwYgzvRYrsnHLsolcIx6zf4olqSh6o1w6LPAklfK2UD4SxVtE/X47S4UmFYt64MhLJVn0y/Wl/uLv7hajn7HQks1yAY+XUv5HxeXY0klm4NjnXOoljShGV91dCVQo5cDqBoDFfEEvZfFKjNTiDUxURfnsriex+sg25rqGkhWin3VFEsEhaHe1j5TfTy3F8YrGxNJt2Puyw5tKsXiugDBYShHJYkEsciAxxEZTx3SVe3Rw5vZpWmSRLSPRBU39s+MJPKdiOL7XP53nQitIPZ0eYsK+ZJ6A3YaifcsaTC/fLdTsLY7QDP0deuTHLY3dXhNX7u5TLDHjiRXA9lmoX9p08/LmE6wmTzmPwVQNchPviN2F/p/sd9f0IyOcL6UNW+X1is5v5UyjOPl+4D0SsWA1c4Rfov17NszFO+A8fLSJPawKYLCkXbiJ5/NfAFwqizdbsUZzdI0i19ppCCH0rg6Az6qh0+PPsSW2Cwi37IrF358QtDVSMuq2P51oqZCxv2I4OpkCa+uuH8WRNeIG02fC/9/EWOM6YKxjE1x+u4YnyB+ce1MHslosXhQ24TwTcD+oV+k1nr+GT13PjuqVmMMhKZQyro66uh3GgWWY8dsiPjeC4j0NkmTlix3JrknyfWWFkWb+sdtoNfbn40OnjDy2R9qZ2se8b04bKsy8AKWIYXPKXOjV2uQeH9K8l34RB+psFh5iI= X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V6FdyBrudVep1VdtVM8f+MMM/hZnyAMR++3gaklQun9hCds5K6V/u2O3Wxq5z3ps22z6xsiLVPYfvQvurUfe5oQhGrN0cEmEJeaCjjnV59FDRiMHAoL5bUQFFsRqi24KO4zqAPUDURdatRKWJQA3ZX+83hgbe3i0qyIdC8wdZYPUjp8ooiNXCKOl5rEeaNWq8ckrHyID7h6zTeHFRjPybLlyvgff6cO1jjCLQtusUEHE3ImXOYOUyUChRLex5WPOgP6KCuy0nfCf62FsewNGEWE8L2PxdDgQMH5tKodsIGKVS04t3I+1ZrnmvlB+gZ9gI4EnDRHuehZgOUCUf1dM/6xuOHoyLZZsR0LIeF82JWzPbGW/xhsb+3ufOOEIc8OoRxT7lOoZShOOVeMyuD4OCe057CrexzrOBhTaD4ze9hPfTHo9gA+KmSgeU5+sPC19 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GCpUoa++bq7B5ESkpd6NyUX6h1uK3CXw6GGJrTrqmuQ3dZknUhpueKl+nn7B1SxX7cCbOYN28b1GlFaDAlngf0P9n371KDXEoYxh9LNpn5jPJaoG5wKRfD1PcHEg02ho/IA7M3qgwAAKiiakk+c8uQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19ad4a2f-befe-4d21-d8e6-08d97ea707d0 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:30:10.7452 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 23/27] avformat/omaenc: Simplify writing padding 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: qWZma6HKQ9vb Signed-off-by: Andreas Rheinhardt --- libavformat/omaenc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavformat/omaenc.c b/libavformat/omaenc.c index ec71956fbd..1c4edcac5c 100644 --- a/libavformat/omaenc.c +++ b/libavformat/omaenc.c @@ -29,7 +29,6 @@ static av_cold int oma_write_header(AVFormatContext *s) { - int i; AVCodecParameters *par; int srate_index; int isjointstereo; @@ -55,8 +54,7 @@ static av_cold int oma_write_header(AVFormatContext *s) avio_w8(s->pb, EA3_HEADER_SIZE >> 7); avio_w8(s->pb, EA3_HEADER_SIZE & 0x7F); avio_wl16(s->pb, 0xFFFF); /* not encrypted */ - for (i = 0; i < 6; i++) - avio_wl32(s->pb, 0); /* Padding + DRM id */ + ffio_fill(s->pb, 0, 6 * 4); /* Padding + DRM id */ switch (par->codec_tag) { case OMA_CODECID_ATRAC3: @@ -88,8 +86,7 @@ static av_cold int oma_write_header(AVFormatContext *s) av_fourcc2str(par->codec_tag)); return AVERROR(EINVAL); } - for (i = 0; i < (EA3_HEADER_SIZE - 36)/4; i++) - avio_wl32(s->pb, 0); /* Padding */ + ffio_fill(s->pb, 0, EA3_HEADER_SIZE - 36); /* Padding */ return 0; } From patchwork Thu Sep 23 15:28:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30490 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp569267iob; Thu, 23 Sep 2021 08:33:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOaHaqzwo8wCXISvz2yc4QgEaLWICOV/HnufXb/6Rr54fSXW8Fya3tJUxjn6C1okWfq4XK X-Received: by 2002:a50:fa89:: with SMTP id w9mr6385578edr.113.1632411205648; Thu, 23 Sep 2021 08:33:25 -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 v14si5584559edi.151.2021.09.23.08.33.25; Thu, 23 Sep 2021 08:33:25 -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=R8Vbd0mR; 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 0223C68A94E; Thu, 23 Sep 2021 18:30:19 +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-oln040092074076.outbound.protection.outlook.com [40.92.74.76]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BBCE768AE7C for ; Thu, 23 Sep 2021 18:30:16 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JbHphnhU5a2DPByFvgSwgw2kcG6Vi3wMe4cX1nU/YERr+GkRJJ8+s9COSAL6IGTg95hnx66Aep8YD8zwzBMTlb13LCLPh6ZnPCAlcVNjcDAlAuof1s19c+idjz59WhdXDtZAVsI4o+s13v7WnAfpDu+HeAFKSbjgIAUeqlV7xfUxaOpUM9u8XsqQYNcGbY+4X/8rjVGJrnlXCfCfVSzSSu52cKjUyFfMac0AXcshNNF4EVPMQG1qWHtT/vl+ZyWyWAwAkXwja4uzg5z5uVndxDfMKUY670Yl9NZmxguSu+GFof/OjAqREQWcmlAosYJZRHOAxndwKh/Uh7pq9spp5Q== 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; bh=9lNLV9xkZHWzRoyo/KLaGePYmiFikp+KulJ9oOWfAYM=; b=LgyBq3kdHoILd6BEkE5zJZEiUzV73j0lqoEFmDjUNu8WogfgcyQLThPIKnilst40CzNhfTwjzlPFK7d8NRFvb0XAMgY6tlBHveJk/98oWzPgYuxZGENNLxMfWhLp0l1iHWbQMLPaq2UPosAcslHGwCAEqFQFlDrx0R92c6cfoJJZZ1m1Zoausznagni9KdnM8gtO6h71yCS+9j6Enw8cdtVDmq8GZJMQ/qRebUHLtNj20u3ltoQCpzE1I2YLFdPxBT5eZ/mQcYRgwvoyleRzxRWXlUxat0KVyHWvqIbBwz+lIhuqIeCV53uEiyERosFWgp2hBCHfpTlDGhLd7HBdvw== 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=9lNLV9xkZHWzRoyo/KLaGePYmiFikp+KulJ9oOWfAYM=; b=R8Vbd0mR2bfOuUxH/7KBaUm7HMYhChBsn6w5hkWjdk0oXfOAOLr9D8Vv5k/BpAU3LtMWcY8KtIPlFeCcbvaljW0Vx4lud8514pErqaFt8blCot0sJ7fP+vCymA3Js6W/x5SP1KQnFd3myI9p7CuwwDov4WK3+J8zeC+9pt/9ALrmuH8VtCr04eKKmXX2lLXYVew2CW+FWSBtdk9/KO+DWGsPIVaIkBmRDjtPo24uxIrhSSqdfoOELwi7t6VvyuVDNYBhcBxT9eFvUETxInXMg1rT05fanw6EtZjqY+OrR1+axx/fJbe5ICqszZWlOGhBeaeHv0tjKPo17Bsin7YQDA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:30:15 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:30:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:28:59 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [AoJWMwuFzSROc0+Zoz+cVuKu1mgEX7fo] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-23-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:30:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c97faf2b-73d7-48b0-10f4-08d97ea70aa5 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWt8qMG3IjM1pM+gnFiFAdPHZVn224UeRe7ZLVEpzdZOdg1tY8YFdYLJLdQdUCA15vMQZm7CrfeentqBS4jbPPoULEv/TFCZER7FLzKgwpDDwq7NOZ+HZ2CGY+WHLduwF1ym04u1efdcHx4im0ZrtPtiXfszRSeyKCUdQW9upRzwueJ2VOFW6IhlWq/IqhhHZRtzTL9Lq0r5Ng1FDfbl5vKHADpluPPR3iy8bHyb7p8ySmdF9zWWtJ+xi26Tq55od6tCvL11uPd2yLDx5/QG6/MLspbvMEJQdvxy8BWzinfUooEFrZlyVYJfjJfcpErLTDiQFE1aPE8g+7JU6pqDfOagc2fKikxp5UaS9ZYNRD/LWFtlh5a+ZinBpPqiWFW0+VzAWW4YK7y8nFpEFYTvaC9aILxwjZcBbQLrsNtPlgjrSXKlV2d3f0mjaM488xpG76qxX/9EUxXbetEdVQ7kFfAbcZU9hQI+nocuN3d65m3KA0JRESmK6KmoFfkwe1Pz25Pl1lob3cJ1TzTZr5t0vmUiJZnFIvZG0Xft8PrTu3zhilQBk/ueTh5GqQp7u01qECBDpf452WPjgYiPTn6RXcXtyhYd1Y6M8fLkt+qNxxwpyTICHMrnedUpR0XdPaa2JMhcaVBA1q3qZGrbHdBcELoxEosSusW8AUU8ZS5j+Q9FdbkDX0gBHBKjcjEMihU28qgaPzX/UnEkY2Mr0if42zrPwHXab19ydU= X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M4jMG23+9bZznBP2AxVErYc7GyRSTBNzrRaTEwN0xNvNy4Iksa20b2gBSXlfU2WHtoNgbjiVyNyw9tVfMRgX9yDTwJxta5u92M4UIcXgD3O+50uDHPAV5Oij9SLbVWVU6V9mtgxRws4fswpTT7PIPOhdFSTQSE3WDPsPtMc1xINUyER6Ri0BhOdVlD3axgOvghd2IYFb/cv+3n9677Y39FS11aicYwrqRuG8ZmIOyjhTDOCB0zZCuawwNPW3KtBq/is/fzOZ+uz2wzJ8ERKKkrebwC7p5UCySu0KFAqDUvoydbXUDzm2PWH7kYRjcO+d8E/jUkPU1sRsYLCxjpyalPjU02lgQnjK03FbUXJK4w6Tz3OAd6Js+3019+fyK8u4b9/uG8Yuj9VVUrwXM7R1cTgaN+BykWKrW3Ww9BimLaZDDfaoSpSgVaucnvHHC3Hn X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: M6SPpqrtLV+yoRYHiZQCMIvhcpOGaC7YW5b47nUaVh/TcFolR0temk/YeAtUsN4dBo+fCHn+aFUnwugqKq3VXhYbY3rgeXWOwAtBfusdy0jPftJuxzp1bIJALPieAZCv6kK+9UhufzkooU4Z5PplKw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c97faf2b-73d7-48b0-10f4-08d97ea70aa5 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:30:15.4835 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 24/27] avformat/aviobuf: Extend ffio_fill to 64bits 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: 9Jwvy1a25Amg Signed-off-by: Andreas Rheinhardt --- libavformat/avio_internal.h | 2 +- libavformat/aviobuf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h index 8b9e048f73..11060e9ff9 100644 --- a/libavformat/avio_internal.h +++ b/libavformat/avio_internal.h @@ -100,7 +100,7 @@ void ffio_init_context(FFIOContext *s, */ int ffio_read_indirect(AVIOContext *s, unsigned char *buf, int size, const unsigned char **data); -void ffio_fill(AVIOContext *s, int b, int count); +void ffio_fill(AVIOContext *s, int b, int64_t count); static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s) { diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 28db2c7dbd..d79e41ca77 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -201,7 +201,7 @@ void avio_w8(AVIOContext *s, int b) flush_buffer(s); } -void ffio_fill(AVIOContext *s, int b, int count) +void ffio_fill(AVIOContext *s, int b, int64_t count) { while (count > 0) { int len = FFMIN(s->buf_end - s->buf_ptr, count); From patchwork Thu Sep 23 15:29:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30499 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp569499iob; Thu, 23 Sep 2021 08:33:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkEImr3WDDSQybrlxk893LhrwHsMAIAyVadLp1Kx4Gjir2T7nII68pWh6aiCgs0cm5jsCI X-Received: by 2002:a05:6402:2049:: with SMTP id bc9mr6239257edb.317.1632411218504; Thu, 23 Sep 2021 08:33:38 -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 g22si6283003edb.47.2021.09.23.08.33.37; Thu, 23 Sep 2021 08:33:38 -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=YwCSJyjn; 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 40E9568AF0E; Thu, 23 Sep 2021 18:30:23 +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-oln040092074076.outbound.protection.outlook.com [40.92.74.76]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E0D0468A949 for ; Thu, 23 Sep 2021 18:30:16 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iHfhoRYdVAPUJsXCSr6EdfG8CQK5JwU+FJeYNMPZqq/NbxJ8NtNOkinlHADHx6Gc//k5q+OKp/gT3p8xquYNg8SlSa82hE22uQMJL6Ok5ULCy5jTRIiXyYoceqgBryFrnLEPlgOk4Eioi4nhXE+7qVw6Wf6qmSzORKv+IlOzxh0TjlT4//ADOM8NqzHV/v9PJ/D8TXz5tRyvp7hrxySQjAWEm38LQ65blU7tT5+PZml13x7D7eL65KVvZPdz3Iyi8fVT9Wm03Z/9GTepDVR1Y0PVlpSVhQSBLTeUf62KAD1rpNyvVFg+4sskbQ/F4ubuFvoF/T85MYbdZSH17d5t+g== 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; bh=cNLaXPoIVBYWeS3FfRzdFyoSxIhNyvsqR9MCAHdnTuE=; b=MJN8FNdxGxtiOz6+xIqDDgn6SEEomFSb3zjlh0mkHfr9DMgGXaNxidqcAsxqYI09xNR8LbyJwMUJOA+TrR5T6ejaJJ2jNELYnXoG5uRtPSIccJi5lPSrnebw+sYDMtugA1MPjwWizEHR3VV/MOz3HHNIeFdG1JzUlyiqkx1maVjqkzTcFwNBhZge4K4pAxL/OH7oJeshRRIkc9wLWKuCYQANOxS6rDsakZIW8mW9wa88McUyV9sBo++1YbstRYErFmsXoOA6jbGU2KYFf6NpzCmla9JAobEbdkKDl59gAy/rq27qZVFgDInu/yotA+PCmGZt4/2Lm7ecOoDMRHQQwg== 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=cNLaXPoIVBYWeS3FfRzdFyoSxIhNyvsqR9MCAHdnTuE=; b=YwCSJyjnNREB8R2c7mdo4NM/l4fFUQ41KYyPZLnVMhx+O/Ho8iuFCUz37AlCLz7Xu8RerOk3904u6+6Mdgd4adRAT9iU8ZXZgJZ8UZ/vWEmAzWO9ZF/NXnwnLqwq5ppzMOr+GYhFQADMZqOj6gvI7BATRX3E1FMxn2ocJL+Jod/EU0TZ7EQOTYPBs9LnDZDKG12oBjPz5HfP6WABtcToeUAA9+dN3km+OfW4URueLtvaYfbgCxsk2XKlLTGdEpCh9W8XBHz33BTGOI3uU0C5IHHsaGtU29Irq+QlP36MddauZQvwWuD17iL5CGTdl8mrV9C1KitYg/0b0LFU0glvUA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:30:16 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:30:16 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:29:00 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [Xb4Tkn/Jpe8syP/gFCSHI84cd0984qHe] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-24-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:30:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 706d42f7-caa0-416c-5e5a-08d97ea70b37 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWt8qMG3IjM1pM+gnFiFAdPVfCiTmwYgzvRYrsnHLsolZCUjPpCJC5zROxG0QZZRgw6X3VYFP79ZCgSOkvlYPfFrJsiPCBpPIIomcxBtCob9m+u5Ee2RqVYnsPG7opC+AKRk9pXspCdCaovsetFxbFTELVH2Vv5ySPwFKq5fLbsYpWCvOb6FPZQpkHhbx5CZPHmj8XGx6IlEVrAT5IiOKORVIyhhx9eGDqbDpS8Tvv1MBJUk6XEjnv8mB3AOQDeROQghW8ASIhwW8jk8cUGEud6nFlQZOnc+WKHD17LFPjRmdNv7BqLvomLPuocYyBeD3N040IeSP1HEGWzZaBhbiIkefwR8IvIoozq2f3nlzIwn9dM289ONdlwwBA8aa7DsshdTWvnbhkH8n9wlEYeJsYknzORZjNwnNCMUH29wMUkqafCsP2zoIj7WoVV/R5GX3DHCbX3QjytrTPsBUWZAGrdq5SUaiM42q5hF4MPPwfg3x/B7s5tbjIOTYNer58LHCUHX/VqxfC+dXIFJ+yteTr4CLhZkDPDB9ux+jKc4C2G1ZgeMpcHHS/qCSoOm0/1cu+RtU14J/OQIIrgD82YxKeUtN+Q9tjljD9Qs2v7n84TxzHcPEu3bj5HnTj5NBcYk8+I6Ajlu5+CS7ccnzbmwZ6ZNnhjpjYPp0WCgF3Zk7bHgu5I/l7EFAHKzKPLUJsX/XKnpguV2XUueDOY3CnAHV+rC4rDkkl6j30= X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MMaVnkRDulLJz3YW6mEte0BCB2+8QEvsGdq+f+5BkrKMe+oy9nBHrjLDHU7VqL+LRNG7glvljPa3zIIbZ6fmHyYWnHVgZCs6TINVmQYJsAb5RtDUd1f/4JO4Nm8aRDADbRxIYuva3gW9DWv/by5nmq6HpinkNnnzf+QfLTLuiAqiJuZLVMpIcAqCmyyXYvSDLAk0HSmM7CaMoQpCm8y0PDdAcJe/Xd6Dro63keNZUwMIMzYaxa8S5AndNNvVKqAS/ZQLri6jTTrkKxiLrHKYg2f0bJp7dtUa8X0Q0lMwvf3rjZKi0KYrE85ttKmSBh2znihrpuGiaHKvSYNLBCHp1osxXB2HbvlLONOBDmvYINcugf5ZkWCK9s2118Ah/p3biY1lBYAe8qJZ3W+VDOnOnxwSVWKBnQCBszbfQACP6gp8BkAMmrKPVBU9ggVjBrdU X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: s/ZXVtX2CWKEnKo75pclnF+fy+3utUvvRXeeWdGFHvH7PYQmcd7Zn7a0K4XFKquHlV7HVtQVzYBf/6qD1CHWDIzsV+2B6y86u+OFbcUIK+MGalb0Lf9wwKqpQ4aNguHIdDrc/wDh3x0ynJh0BoMHLA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 706d42f7-caa0-416c-5e5a-08d97ea70b37 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:30:16.4582 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 25/27] avformat/avienc: Simplify writing padding 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: Ard7vJdRq1cH Signed-off-by: Andreas Rheinhardt --- write_odml_master() was responsible for 134406 of the 135347 calls to avio_wl64() during a fate-run. libavformat/avienc.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/libavformat/avienc.c b/libavformat/avienc.c index 9eb072ce12..3b11841cd3 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -237,7 +237,6 @@ static void write_odml_master(AVFormatContext *s, int stream_index) AVCodecParameters *par = st->codecpar; AVIStream *avist = st->priv_data; unsigned char tag[5]; - int j; /* Starting to lay out AVI OpenDML master index. * We want to make it JUNK entry for now, since we'd @@ -250,10 +249,8 @@ static void write_odml_master(AVFormatContext *s, int stream_index) avio_wl32(pb, 0); /* nEntriesInUse (will fill out later on) */ ffio_wfourcc(pb, avi_stream2fourcc(tag, stream_index, par->codec_type)); /* dwChunkId */ - avio_wl64(pb, 0); /* dwReserved[3] */ - avio_wl32(pb, 0); /* Must be 0. */ - for (j = 0; j < avi->master_index_max_size * 2; j++) - avio_wl64(pb, 0); + ffio_fill(pb, 0, 3 * 4 /* dwReserved[3] */ + + 16LL * avi->master_index_max_size); ff_end_tag(pb, avist->indexes.indx_start); } @@ -351,10 +348,7 @@ static int avi_write_header(AVFormatContext *s) avio_wl32(pb, 0); avio_wl32(pb, 0); } - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ + ffio_fill(pb, 0, 4 * 4); /* reserved */ /* stream list */ for (i = 0; i < n; i++) { @@ -569,8 +563,7 @@ static int avi_write_header(AVFormatContext *s) ffio_wfourcc(pb, "odml"); ffio_wfourcc(pb, "dmlh"); avio_wl32(pb, 248); - for (i = 0; i < 248; i += 4) - avio_wl32(pb, 0); + ffio_fill(pb, 0, 248); ff_end_tag(pb, avi->odml_list); } @@ -586,8 +579,7 @@ static int avi_write_header(AVFormatContext *s) /* some padding for easier tag editing */ if (padding) { list2 = ff_start_tag(pb, "JUNK"); - for (i = padding; i > 0; i -= 4) - avio_wl32(pb, 0); + ffio_fill(pb, 0, FFALIGN((uint32_t)padding, 4)); ff_end_tag(pb, list2); } From patchwork Thu Sep 23 15:29:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30489 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp569688iob; Thu, 23 Sep 2021 08:33:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsgGvStXA0Cv1AwOEYSE5mi8KSZdxXFpbMS2nzI92DM8osQ6pySDeGQzGUmGbibyYAlJ8T X-Received: by 2002:a50:d84c:: with SMTP id v12mr6062269edj.203.1632411230927; Thu, 23 Sep 2021 08:33:50 -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 h7si7069579ejo.107.2021.09.23.08.33.50; Thu, 23 Sep 2021 08:33:50 -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="Or/dBwH+"; 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 5B88268AEB3; Thu, 23 Sep 2021 18:30:24 +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-oln040092074076.outbound.protection.outlook.com [40.92.74.76]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C5B868AEEF for ; Thu, 23 Sep 2021 18:30:22 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZDk/sQ2sTP/pagLdAMo6REWWx5oXzzTrdN3nytOVqYHHZYm0tvZJjR4A4OuAdaMYMjW9yRRAhIdRQbtcq3WMlje0+2IRj6UXGOU4jJ7UdPUSuN9WWlZ8XPAvikf4Tz61Rs3y/jSzW81abcHvLaY1Ll3B2gK7/KArecLUWiVilxshtASJKp0gQa+BGY1PcJ6QuB6XlJUMJXIEsE1aj/6IVsH8cJzVlLcK/h3NCGGRyC/h2S+hj7q/Vua9nicm5sGEoqTlUaFIkIlNHqmQqdCZUUXDLVPQrix0gTVCd0waSRRRoc45uawEF+/pM5wLNFGuIAnIKVwcKl0zeQ9RoUMIrQ== 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; bh=GRAN6QA1wSLEVrEg9RFcEqTpY69AwvZ0NuDy8LfiHX4=; b=GhgWyxkJLJ/7FneVMbVzufekhZu1QqBinxOJ16KPahY9vxZKAkrboZFE8ZTsP7rKtxlgKws2PhWwG//VyXT8KoF34GU1ZIOdclM7XoqTOQlrubx0/Jc41mRTKOO4m2D1whrvZVT+2xjwEf7dyr1HJtG2ORzrxnEcBcfYVhoZsu+pcoVoyCRLx8M5sV87u4WosbIg2CBxA5HDjz1ZgfxAI7NtDbMOuFpJsma8pw3Del8Oqxuyy+Y3fJGQL+rutNnrrjTNNJzvznM4/wMT8X46DX4mm9rErolm/V3I/ZHABQpST517b0Zi8R3OG8k8ynWsF5f5VYTPsT7MVQEbs99HRw== 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=GRAN6QA1wSLEVrEg9RFcEqTpY69AwvZ0NuDy8LfiHX4=; b=Or/dBwH+ukXomYOV3CkV5ex8X98HWulM946eRYai7JOrQ+mnHDsoeYAaUD823jX68fobVVYHCdy8WGnxcA1C9z+t1UJdM833wNnAtd8a4OH7gfdW/yPRiw41xddQ/UG/qShS4GrZVlxQ/njj80u3Q894EsOKK/2JcnQwtRMFVpaZ5i9MOIjKdwQ/qmndxFUUl/kt5zkxHmR9xouv1tzPeCzkuLGSSzZfSEMfLn91CeZ8kTJHPh39YjabditTBKtKWREDNcjcWKJaDyaHvTGu//cGhRiX3e0W5TlLfcoFTpYf+msG9Ul2FDZr6bUxVz3Fx6u++wHyXTOPa6Czoqq4CA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:30:18 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:30:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:29:01 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [/wl2kxA2u9bhE/GY5pmi3GUGYpI4P3+h] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-25-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:30:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c624423-2850-4c8e-6ec0-08d97ea70c74 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSygBPrM25OmITrtIHMJgdSpeozhxIfJwvfULbhhanCVSGeJMZzI4BgUi2BW7Kfvfd7ewcNWfbm1LS6oOWDgfZNcK0v3P4oDMxyRgGwKMhIFZiJV+fXeh/tJYEaSQnh5bTdcB0B4encUZZ1EDd8yAxwDEsn2tLtiNa0yWq2eM6NcB9/I3uXDD8rxj68I9tdgvWYtbvoRF1dHLE4oafPyM2OkMZ8aXgNncgqBJB/fqEJ5VQLCLmHBTMMuSN19ZY1/N+WDBNNHNxweQykbPW+p5lTEOcUbFjdtnsoJHGl/KdL1WyDeB+sawsIjKQZJ8sG5WOp/IvOgBlj6uQ6DeDMa3jF0DiiEVcr6OZ8plSC0pAz86auIBS3yBrO36cDu4QizBuqQeq9tVn2IV9wo9PdooEP0cB74N97QylB5r+1dQzsFhLopWOE3XnFxFm1V9+dj7aw/iD8SVBH6L4r8EhEJRRTutp7+4b4gG4NmAgx+YiLHbcO/dGLPq0+9J6Km1jN1bCjtdxbsEqNUPml6uXChy9O9KyykAQoQ8fBUHq7z87lcxzAQ8NGxI0c+Xlpm9pNN6Z0sZNvte5lsVSuBkRvJ5bn+H4PQhvgLDl6pL9fkmNlNbpEMQ+IBH74EtkkNFl5Xqe3y3mBL0CuhvL7REyLNNf0jMX9w6VEtvKo2tNqYqAdPYffyNGVvkLu11k2obUOTcv9SJ24rIkKRihkLAocyNiWHbbEd4qhdM32kRfieq9CdyYgbwUjCB/nHHlLOL4C428= X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jaVB9lOKeIRj4E1dyT/Nb+EvRIAfqrNTa/WmKTNcMa6jfKpZpSuC3pC1S9we8cm1M0BPUj+Eb1pie3h7AICWRr4qlJjS5MS1Dn0arq1g/e8BJQ5OmzvRFPZY3HYHRZmTHZ8l7BcZuYMQPqZQGONArfmo9qlJSF2+TMASJusM2arlip10BAlbEHmD8vEgLEbI3MTRus4jCm+pJKi4I2oOhqBWtGOxsqnNgp34cWTtJw9iNqdNelcjWgnI/eCHL36SF2j2+HTedqxAwkJe3WP5hAfyw8cg2yg084ag175/IpDi9e8qbiFStdKV6atykUBN25364SECuOodCJq6wJHvJWXAPqfOXDNjRwtldbZx1uQMF2DD7XqOSysqnwEiRhA/HzogH37ghCo0NlA46NqK8ZIpGlpahG85wP2TGc6W/Sg/3Yy7ok9fOrYIbl8/e5q5 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ThDoy+meGHxxUBdvb6z+2je8kIbbNd2FFL9Hq/40x/hNJ3XFrb6BXMaT5BT8T4Gidnd3DhKp8fvxhBG+O+dHtiroD95/UqHf+DnKdZ5CcvEapH9yu4OltPF9GzpnGCNI9PDY7m8/uerPh6g+ohVVYA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c624423-2850-4c8e-6ec0-08d97ea70c74 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:30:18.5451 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 26/27] avformat/gxfenc: Simplify writing padding/reserved elements 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: rq4aNmeTXM5R Signed-off-by: Andreas Rheinhardt --- libavformat/gxfenc.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index 1a80ecb603..8cc3bd456e 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -25,6 +25,7 @@ #include "libavutil/mathematics.h" #include "libavutil/timecode.h" #include "avformat.h" +#include "avio_internal.h" #include "internal.h" #include "gxf.h" @@ -134,9 +135,7 @@ static int gxf_find_lines_index(AVStream *st) static void gxf_write_padding(AVIOContext *pb, int64_t to_pad) { - for (; to_pad > 0; to_pad--) { - avio_w8(pb, 0); - } + ffio_fill(pb, 0, to_pad); } static int64_t updatePacketSize(AVIOContext *pb, int64_t pos) @@ -424,8 +423,7 @@ static int gxf_write_flt_packet(AVFormatContext *s) avio_wl32(pb, gxf->flt_entries[(i*fields_per_flt)>>1]); } - for (; i < 1000; i++) - avio_wl32(pb, 0); + ffio_fill(pb, 0, (1000 - i) * 4); return updatePacketSize(pb, pos); } @@ -542,13 +540,7 @@ static int gxf_write_umf_media_mpeg(AVIOContext *pb, AVStream *st) static int gxf_write_umf_media_timecode(AVIOContext *pb, int drop) { avio_wl32(pb, drop); /* drop frame */ - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ - avio_wl32(pb, 0); /* reserved */ + ffio_fill(pb, 0, 7 * 4); /* reserved */ return 32; } @@ -559,13 +551,7 @@ static int gxf_write_umf_media_dv(AVIOContext *pb, GXFStreamContext *sc, AVStrea if (st->codecpar->format == AV_PIX_FMT_YUV420P) dv_umf_data |= 0x20; /* marks as DVCAM instead of DVPRO */ avio_wl32(pb, dv_umf_data); - avio_wl32(pb, 0); - avio_wl32(pb, 0); - avio_wl32(pb, 0); - avio_wl32(pb, 0); - avio_wl32(pb, 0); - avio_wl32(pb, 0); - avio_wl32(pb, 0); + ffio_fill(pb, 0, 7 * 4); return 32; } @@ -585,11 +571,10 @@ static int gxf_write_umf_media_description(AVFormatContext *s) GXFContext *gxf = s->priv_data; AVIOContext *pb = s->pb; int64_t pos; - int i, j; pos = avio_tell(pb); gxf->umf_media_offset = pos - gxf->umf_start_offset; - for (i = 0; i <= s->nb_streams; ++i) { + for (unsigned i = 0; i <= s->nb_streams; ++i) { GXFStreamContext *sc; int64_t startpos, curpos; @@ -609,8 +594,7 @@ static int gxf_write_umf_media_description(AVFormatContext *s) avio_wl32(pb, gxf->nb_fields); /* mark out */ avio_write(pb, ES_NAME_PATTERN, strlen(ES_NAME_PATTERN)); avio_wb16(pb, sc->media_info); - for (j = strlen(ES_NAME_PATTERN)+2; j < 88; j++) - avio_w8(pb, 0); + ffio_fill(pb, 0, 88 - (strlen(ES_NAME_PATTERN) + 2)); avio_wl32(pb, sc->track_type); avio_wl32(pb, sc->sample_rate); avio_wl32(pb, sc->sample_size); From patchwork Thu Sep 23 15:29:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30494 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp569904iob; Thu, 23 Sep 2021 08:34:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWCcWzYo5vrdCvpayGn5Iio6MqarMn4JpleWPSyR+afthaC9C2P8PEsJmX0xtJ5HCUw7gy X-Received: by 2002:a17:907:2642:: with SMTP id ar2mr5852398ejc.97.1632411243899; Thu, 23 Sep 2021 08:34:03 -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 a4si6522585ejj.105.2021.09.23.08.34.03; Thu, 23 Sep 2021 08:34:03 -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=rFtqT18S; 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 36E9468AF1B; Thu, 23 Sep 2021 18:30:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073069.outbound.protection.outlook.com [40.92.73.69]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6B8CE68AF11 for ; Thu, 23 Sep 2021 18:30:23 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZikT4jtlnNbR+wJEYpMJ6K8tYV6qEIf5nnfkkJcv31qAMtXc3ZByKKqe0zn2oVDcg4PXTZEvYgWBvFPRTyvUVaCi28cyUypl9bX7CVroSEVWzbaZd0Pj0KB4WJmJ0lBbqr4/yxfeaY5gfY7BgDVHaKq1q9s69ZSGBinpBOipIcRxJgzL6ds/pXRngb5VfnND5DdZUflmyCqEhVT7tI9rbZwDFDT6z+h6xYlonnNYv1O7H/sUDC5QUJjEI8gCj7b4uy3canG9bPPkbnjDwX3jRQKVxNSSVxSiegF9+QfgfHImSTxfLuUkEEE21W/K24Acin3r4kpT+iOSDAwYfMjfQQ== 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; bh=6XYLzl0vy5xJHGA73926jsnAXhszhG7A7nJyaL9viqU=; b=KE9SKwQMyo2X7pHnJ0Kf63G7KLj+ASI6HsaKjus7Ve9Q9qlXDwAbiOxaYWdVUxcNy8EhvF0RrTA6kyR9G34DfT5VeMz5qXQSTuKaijxKGSSOq6z9oL9mhF7jmNM/T4wE43G5GsBtVTh+7fqtm7inuQloYLBtoVIlodK8RHlR6EbM6+EjXzBw6bBu+GuSzSqy2kRLFd1Tczd7tsyoQBemH+/0hl16FjR34ohgDYWIDMYYru3/GSXKEhGAO4TXjXN8DiSi4+8gh3BjTkTRey4uNttl+wKZA5bThlb4UlL3nGE2KpHxYhcrsuzPf75zmUGibCmguwtD14tJmzEoBFTjrg== 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=6XYLzl0vy5xJHGA73926jsnAXhszhG7A7nJyaL9viqU=; b=rFtqT18SXI11Yacm+ACpVHu0kNUuzXRh8KgXu84lxrWPv212Wt9xN/cSG6hspQ5rtFUQxyvKO6Nrvbj2ht0Jvt+hh/QpCtMsYVcyt6IsPOOZZqB4tC+3dLgPt2SIvkI/ILlZc3lRDMm1HeRRY7hooq7o4iPCzBR/HJJnR2rpIfC3WtCY7Ir8Osy9Z7T3fE4P4MvwYhLGtAM3N6Bvy+nNGx0Hf7Oz1bPRTUSHw5BfaU6NMqxXWXD8obJijZK82TamOeJfhZyZBcWQjnpHQ0rrikY/L66BKalOGNOxXU5/HNyAoyPFtFmmZLpkpZt7o/h62UZEU+oP08PfMZN5dVMgew== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5172.eurprd03.prod.outlook.com (2603:10a6:20b:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 23 Sep 2021 15:30:20 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.021; Thu, 23 Sep 2021 15:30:20 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 23 Sep 2021 17:29:02 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [JVDmP2evzIcaX0K7SM59150Xfkgv0E3u] X-ClientProxiedBy: AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210923152902.42865-26-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR06CA0106.eurprd06.prod.outlook.com (2603:10a6:208:fa::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 15:30:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 08a75c41-7c94-4185-3cbc-08d97ea70d89 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/ULYlaWyz2NXCnwh7Enrihvqi3sjs3Z20tDr40cXCDgyA95BnrJz7g+Q2K5XBJF9DWj/QzREaESUHXDyuz40kYheySY5032nQKXAYz7U+Xq563RmpGX6UYA7wrusP/DKQpmGD+ArfHbkBGUHlqowG2sHVkYg9BX97IV5wE5gbzG6uSQ60jlgMKAFTOB56v9pZn0cp/FEA89HAraw/QlQR6m5jrWRSWDPxTL4kRDapTjbe/ltwHlYHxTQOs5zRCLlGnSr2r1j04g3FFQvJwvjkMfiV3VbYNXb2an6eRoWd3IIygfVQvNuCUWAzPxQWc21JBrc8cJTWPDbOsiKwrtCvz5dGZNtVuLxRfwxOInoplfcn01ofbk16QrDkXnwfZlqBoEch5jQbhLhTgnfR/UYQ35p+Dx/o94gWJ3SsTtQsxUvwCAwXiUwj1aR9flN1IWMnnxcDlMSlmkNH32gg1NZDftoPLGhJvJ7ANx5ZrfCzZ5v/J/gfwhGggdZPgHAiEogmqKqQncLTMtWZ0yINs2wCGICqhYNOg2ZZAz3hgWPBcMCXSfkDTmYdCSzZ5GbJT+R5CWyrE7dmgEQxfEmI10Eji+LMCOTysGIFBTpohDdw/hPf6rkJRp4spMVUywHQsioHimXlO1OPE9OJT33IVqE8VbNFxjD0yjsIBlhKbRssNfd1OyviQgFeYLoBNNjZMXHlYgHM6OPICd3qQ== X-MS-TrafficTypeDiagnostic: AM6PR03MB5172: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ALYTGTudN9+7owR9INOjFhE1HU+cL3ITfip9NKhovj5WV7+vI0GOvDvs1uUZRiTkESdM71zCw0zued9alToqVakx1pqW3dEFip6+Y00PXhdWW027ZaJrXay7BbR+58I79o5pnXTa4M5QFzHthipd2huhxC1zeUbrBTLDMmSwLH81CQJbZxfaD3WfdsBOGDPDYGpJqxzMfIij+hDNH71aLvPdm7CPRGoi9kgdb67X+F1sXyC2bO7rceomgPgIE4qUgBHF9F/fw/Cg1oCQnNmdERCMK+XtBezmZHwC0bs6ZofDBTg2rWP3Vh4P6DH17QymDhZmsgU2FOJ6nw4vybJRAps2MK/sZb9wjPASZK6Xm1iBPSinDZP6R9LAUPMge9yhgSnwHBWSg1ACiqO1NzwxhFQQYiq4697CqakUR+ZYnb38tiAGIpMIe6P39c/xtI4B X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YPwW/wuh/bfk8GlR8EEqTInH2dUb7+gtejFvE+Y+qKo2Oec+TnIOGdsb5Ys+NkoFC2TI43wk6S+mR5KoZrffFBMNQcJJmcBrT+IwZSrbtEGaIv+rfLVg389JVPg0j4KfWanmySk/vOS2mMeL+Inq+A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08a75c41-7c94-4185-3cbc-08d97ea70d89 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 15:30:20.3462 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5172 Subject: [FFmpeg-devel] [PATCH 27/27] avformat/mxfenc: Simplfy writing padding 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: BIaeOX4RhsEN Signed-off-by: Andreas Rheinhardt --- libavformat/mxfenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index f37606ed89..56facbe4b7 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -965,7 +965,6 @@ static void mxf_write_structural_component(AVFormatContext *s, AVStream *st, MXF { MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; - int i; mxf_write_metadata_key(pb, 0x011100); PRINT_KEY(s, "sturctural component key", pb->buf_ptr - 16); @@ -985,8 +984,7 @@ static void mxf_write_structural_component(AVFormatContext *s, AVStream *st, MXF // write source package uid, end of the reference mxf_write_local_tag(s, 32, 0x1101); if (!package->ref) { - for (i = 0; i < 4; i++) - avio_wb64(pb, 0); + ffio_fill(pb, 0, 32); } else mxf_write_umid(s, package->ref->instance);