From patchwork Sun Apr 24 03:34:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 35409 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b9e:b0:7d:cfb5:dc7c with SMTP id b30csp1220086pzh; Sat, 23 Apr 2022 20:37:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbRG8Yjdmi9MIr4Xu1T6tmiiSUtwC5Wg5h4Tesh1mc1Wz/+CefO/k52bUj6/AW8V9nw7er X-Received: by 2002:aa7:de0c:0:b0:425:d510:8f40 with SMTP id h12-20020aa7de0c000000b00425d5108f40mr4572237edv.4.1650771436235; Sat, 23 Apr 2022 20:37:16 -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 gv17-20020a1709072bd100b006e7f77fd673si10244342ejc.674.2022.04.23.20.37.15; Sat, 23 Apr 2022 20:37:16 -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=uYRC9Ipn; 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 BC57F68B363; Sun, 24 Apr 2022 06:35:11 +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-oln040092074032.outbound.protection.outlook.com [40.92.74.32]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 049C768B43A for ; Sun, 24 Apr 2022 06:35:08 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C6napmV1gn7hkfSof5ky5dv+8jgpxJ89cVUu3jJJ02qf5H56UgcUdEf90jRa1eKLqYIXXxtMyJb/93fKmmvfLhe7IrOfOk40UgmVh7lT0H68WrMjtvJ9ObgAtrutNwFopKDWfaZhOGefTM2FZ/QdEWlEB1x/6lfKlvsRVTDhClTUuUlNuI/vZWE+1LRmmCF61wLrJDWBVOZzP3X6l+Nh/k7p97KSHs2MAH1JrZxm6j2HFpCkmGatA6QpmgZHDG4e3e7VFM7jXamupNTF3G2eN7gUI6ZrUnIkxE0sWOIUNgdpfFhr34ZAnY1Z9X9PtoIEHO01yE8JRXCne0Rti/WFIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DTsbNeMCLCg0Juo/eVCeus/ZxZ7xY/c1un5kgJZ1qRQ=; b=DTg/JbHzkYNzhLZOdqKurxfawXM37NSssEnxLCQBcKjAs+qxo5rGfZxIoHIQqCDesjKAZemduAy8kQGTTqxpkeuH+9HqFoyft88aS10GrDkSgi8TyrpdGYqM05ioLfEbBup4BvpvFfVpyJPNOuJZS3v+t5eUgItO3S+wo+mkug+Sh3+IZMY+yT9CdCe10WSGNg1yguGKtqj8wwoFOC26sIJDIXVF+RU1SJI60ZzOAtFm3jeFLt/OTLEKV2T9ryBw67qSUGlAmndbwVOdqdzDtIoef9xTI4WhBYBGgUqFbEnbkhSMnFeSQhNCz+BqKrtlxCixus6pmJ0TlU/dP4H4Hg== 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=DTsbNeMCLCg0Juo/eVCeus/ZxZ7xY/c1un5kgJZ1qRQ=; b=uYRC9IpnWgQ+mmp0pkmaXwoMW4B1Fe2dfZy76dasR9PAWgkPQ2OKO+ScO2IHo4gjNFXK87ufmQYrjH/2dJkqyx3haWCS9EcpBhUoe5W03pPNAeIB7MHmqfpLHG5vS2jWudFee3Vdj1SZ+UipoE0X8rjO15e32tCYJPvZXElno5NTKEK14PaNwbc4Vyl+Rhhbn599FWK6qFdcI2fMNe7Df0wmfJZmJKyQPwtw7WOAgo7xtbQNNObfkTdtdYcWp8SyayW2ogWBZ/RpYAI2Li0XmQ6FcjWUp5YHRm9ka116CjxPF5PV0sNhXwCmkQr2L1NL7jpEslmTyC3A704Ry5ZUfg== Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) by VE1PR01MB5534.eurprd01.prod.exchangelabs.com (2603:10a6:803:11e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.16; Sun, 24 Apr 2022 03:35:06 +0000 Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::1854:2c30:7ba1:c431]) by AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::1854:2c30:7ba1:c431%6]) with mapi id 15.20.5186.020; Sun, 24 Apr 2022 03:35:06 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 24 Apr 2022 05:34:03 +0200 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [6ahHYHsK/h8QPURI03tyayUZb3taSQDR] X-ClientProxiedBy: ZR0P278CA0118.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::15) To AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) X-Microsoft-Original-Message-ID: <20220424033417.797645-17-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c51daf1-b734-4483-ba8a-08da25a36d1a X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVNZZwRrMzTbTWNwFwaPCdfkWl7IEuENHATvqli6Z8gPXo3olJl2NUvR2ShPOm2TAk+4iNZEz/AR81H9gzs6zqRb8gSvRva82eYZTQkr+dj47tZSQrtff12YD1DPlfmDP9E+EIZ/WXHUuybLkQ5iG2b2/W8nqKn4sw0A0evpksZzdn5/6asfJxpG1SxOqpvCSmYvJ8O/0L/bpWC7GA9k8Sctiv3O6lDPKbevcQLB/RIDOtcC+yurSRPSr0zxc25voPKGvL8egl5YcQjaZmpX8CosQo6psDxE7luQ6KLZEvUAWSATdmi6gqkGxNVPncvwzlE6rk8jmrKSsNEKxNfIxxFRXIuMlPS3ieEWZPr49eF6Rh2FQW1vUQS2m9bNCu6fVx6R4E2y4UZoi48OKkK/0EJ/E2fUcTdNc8qUcTMI/b4YD6qM6rRhvw8a/5o3oGPzIYkhGgMMpE0aRP/WUlh9QEqn79VcLJvIOaoiMqJBglGgq4hnOqo8vuFeQeORPxSM5avYCiWnIs0NO3FoPmCu3cMnZ78sv4WJipbFrp342fwShaaHa+01LlQTV4fK8sG6YnJ3FJ2aD1I4JQbOqwREIMRgNS63RGMwuNNwFeEGCVsYMM7FT0K/5VFVWf/Xz/rN9aT4EUBeo+Ky3hIWa5ki2UwZka/zxA7+3n6uR7m4khdY67P5JkmwrweKnVFXSJKwezGZd1VUfPSOYJipa3QANgVhuRKKbrosGE= X-MS-TrafficTypeDiagnostic: VE1PR01MB5534:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rb0z5d4DxExoSOkGjlo4JNpnDkNxoEY3aGAZOIs0UNclwLh7ndC2sSxR9E8iG6Cjf/sdlZvHuad3iHun96gGcsfOJLJK/Ev7wYvL4nsQaesz2qeGW+SouBjtiG7XqvXScQo9NESJTPeBiluheYEoUZx+YC1pcQlUhj9M40PotltC2EDWNLE62HwhlpFJCr5YiQNpHWqmitd0JlOcK1fQTCz7C+Wmycm2S+8zK7072/39pljeoc5XCsTk6KVN4P6x4ojT/bvVMTG7BQRZt1G/XNpMpR/L0H+HDPjQkxQ+SVjEJTmeKBcpO9wLXUrrxpjNKbLLcDNC5pkBvoEZjFjeAzh2y6EYVZo9CPsq6JgLRgUOvqkYVrGy8HJbqabeKyxqhFClrTBpiWZ0JFtlfdKz6B6OltLX6AHM1/FI1IlNxQX2fSj0FA4tI/9xJNXKI7jAX/N08B4AkUnAZtydGwZbNG97XPm3WbxE94tiClm579mQbXkC9I8xInFsXupWVzksuQy2a/1lGubUzmzVzg5bS3IRkWhNEIFBVltRLZZiOF5/36jRAu7AW/5oXqIKnt3eQy0lhzf36+wDmYgBAtFvqw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XoIOWMxTJE7nBYLGS7KLteqfc2Xa90nzshj+cjVNGgwBvQzi6gi+zX2vwFmpDI4PjIBxwgu+I4qR3B0ImHO0I7BOAkk4j2RmwK8h6C40mc/Tzrgi+YjbGqqFbGUar3wxF55evxcc42SKm79KBtCg9XyrqyqSQcaonz0QrYsYqbOjec5Fkj0QI9BKEEaVNSqOaEOvmvvxaz7AMU63jTX2anotq8vBk8JpeIu0piCtj5rdYoT8251emJoed2Ba3FK4YWFoKxrD5xVSTluQpytQ7u2OemsluqQyYyxum3lHIqkSj7qeF1NePW19asAMHNGiMA7stq3sqqu0iu7h+H9zS+K6w5MJdhck4yuEtxX1A6CtALZUR/GEemdaNYG794wgF1Txl13HBIjEqeZfINeUheKk7E318Q1ZZm5+2euiNIhX6irIkkInevlFO5r8WhDWUajtltX8aSCHfobWbQccR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da25a36d1a X-MS-Exchange-CrossTenant-AuthSource: AS8PR01MB7944.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2022 03:35:06.8715 (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: VE1PR01MB5534 Subject: [FFmpeg-devel] [PATCH 18/32] avformat/fitsenc: Simplify writing header 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: qDTISxcE3hbh Signed-off-by: Andreas Rheinhardt --- libavformat/fitsenc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavformat/fitsenc.c b/libavformat/fitsenc.c index 5cf34ef067..37ee10bb13 100644 --- a/libavformat/fitsenc.c +++ b/libavformat/fitsenc.c @@ -24,6 +24,7 @@ * FITS muxer. */ +#include "avio_internal.h" #include "internal.h" typedef struct FITSContext { @@ -177,11 +178,7 @@ static int write_image_header(AVFormatContext *s) lines_written++; lines_left = ((lines_written + 35) / 36) * 36 - lines_written; - memset(buffer, ' ', 80); - while (lines_left > 0) { - avio_write(s->pb, buffer, sizeof(buffer)); - lines_left--; - } + ffio_fill(s->pb, ' ', sizeof(buffer) * lines_left); return 0; }