From patchwork Mon Nov 21 01:07:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 39368 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp1832936pzb; Sun, 20 Nov 2022 17:07:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ILHGp8OMTwzKbiW5racGkgZXCbCR1K10W38thUvcPHjYGSimzq1leCG5/SoK8XO1vNjeJ X-Received: by 2002:a17:906:8a6d:b0:7ad:d18f:c2d6 with SMTP id hy13-20020a1709068a6d00b007add18fc2d6mr13831288ejc.271.1668992835090; Sun, 20 Nov 2022 17:07:15 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id wz12-20020a170906fe4c00b0078dad3ace2esi7737205ejb.676.2022.11.20.17.07.14; Sun, 20 Nov 2022 17:07:15 -0800 (PST) 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=XhviMtgP; 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 48CAF68BCC2; Mon, 21 Nov 2022 03:07:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02olkn2059.outbound.protection.outlook.com [40.92.49.59]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C9DB968BC28 for ; Mon, 21 Nov 2022 03:07:05 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EkeFV8ecQ4KmgCtzJwGF9a3XA67PsHAz9rwPaVg9phT1zXpqgFjyrNqJF50VjVBx/TGuzxE5wFSJwYJnxg11svco7EKI9mAt2GcmITRhzsVuXGNGnjN/tQgxosoAkqZ4Nk6lLuuxfxK6NsGLMYL0/2bd0ER7IeeZw9ETriPNeQn63f56Gyo7LJ97jNJWXazNGqe6MQjw4RADHHkO0ZpvCxqyvM+uz/ZbJuLEpY9099CCY+wRH54vC7/bACg63z4OOL6qW82jXgk0T58CQmUi1YnPkHvIagbX5qlKFsLxcavYm9b9AvS3JFanfd/0pWz5nhrjm//VsyH/W6IK48n6GQ== 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=BUDye1wQlQDFwmcV/2a3gMp20E87cM0oBHpRBCULDP0=; b=V30pyAOAcGz02X5ouuzpHfiMecBlqsZHUUI2VCbANNzO8F7gc42YeDpl9npGFr/Px/gWUg4BeMaOIhZBbTrywYHSgk+aUZQDlNlFqApzyr6uG70ykgX0eXX3QoKCOW0PJd2JpXYBtUJAnX6nEpyyi7ije35XZhWVO78zQmJ8qqmcnbNaKkd2UWTvyw8d08tJBGRt//MuHO/H5YMTR5XIRxVLodxEVnJUR5194o5+2wp/7e7XkQ6aVOXqff7IUAC4JyywU3m9o6xAMyrdV/rpKeSwd8ypaP8pbPTJqY5XIoNV0cgDdhAdHr97kAJGPX5BeMEgtHLyZIF6MuZhsPrLRg== 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=BUDye1wQlQDFwmcV/2a3gMp20E87cM0oBHpRBCULDP0=; b=XhviMtgPtECh8I3H75kKzorKaaQR+gGJ/6bN6T448W9DsHrrfe8Emku25HCJLVdRs24/Eq6rCYiue1GZ5Xcc2KhTBsTeW5Y9Y4Htmcz+cY8nWvGdVpfWAuMng+0BhVpNnYj11RPjYg//PlMRal99N3PAHy9ux+cYxMiYWJLj1LaesGHVLdM5FDSI+DGc6EqLBSa53qr6ebcGTlf7M/WOi/nTu5jEimhv8lJxjo3Ipi54y/DDN5z04F1oxf3xfih9U30CrwqEa7nz3AloM3fp14/b31/s0skca8LSHiTf6kxOTRNz+bmQA+07pmAE18iMuKN9+cmd9WL61dR0Z8T3Ow== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PRAP250MB0465.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:278::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Mon, 21 Nov 2022 01:07:04 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::c37:cabe:316a:60b2]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::c37:cabe:316a:60b2%4]) with mapi id 15.20.5834.011; Mon, 21 Nov 2022 01:07:04 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Nov 2022 02:07:12 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [BWma0DhIhiy024B1dTt3/D45l5C9R2iU/YgFtjK8ovs=] X-ClientProxiedBy: FR0P281CA0075.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::10) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221121010716.2131624-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PRAP250MB0465:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ca3007b-8e9b-47ef-6c9a-08dacb5cb3df X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmo0aNP8rr9jcp/TekB2Cf+UFQhkRb/8/QdAxxZxs24GMSPWeIbgayHIwMyOnKpGFW7CrTnXXNbP/628Jk6pF8RYfGO2baeskobdW+LaVbfuhEl4a0ywUgitBBCLFni1JBoK07K0L2fhWkUF83mpYtfzH4u0AgR0o1FH00QyCxtA5jt1k/IpmvZkuS6TkmhdJpkjlyUHIDzV92Evlb9FwBcvye/mPj83JEp07cRKvKTmcy5fCwU21u03sW0XyXEYRi5i4U628moHguUapRgI20zeTzG+F5nQH4WhRiTzPv2N6/60n3iYwBWnHZ+C1sM3D0JzaOvLLvquv302aTMzXjJrygJjdC7C7O6nXKRbLRDOssN16DiAI3027VDAQlzATeqoAB6wJk4QkjKMm4mGzwvmbWMqJIf7mZOEAvcLqi2bZSrX3E3EBj+AbgP6f9u50dIqmqb+gIRNx7sGFSGZ88PKLSLyZTtVhrgoEgiSnOGuq7HeNDNOM3ltpSuWj3XcgsRSa1ga/UaazzIpLJklP/WuJDoSCdaqYcWOjDacCFF1ZsK6btHvuZuG0OomtkXBLZx7ZC0dZhD4pm7PLsmgRI0XMwYfhwCzj9WGuB6Gu5zwDRwimp0jXmcoLsk59gvOG4HaX1bCTWBjJF2npcxswhhQ8sFhEnShZznpw/JZTYnQwvEApMpUURkNDHLGlL7RpOQWy6QEBfXSfy6U1VumnO/xlakJoaZSlJgTDNGIZKgybB8TFgqStUZEng0MPTkX4Uw= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 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3007b-8e9b-47ef-6c9a-08dacb5cb3df X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2022 01:07:04.3727 (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: PRAP250MB0465 Subject: [FFmpeg-devel] [PATCH v2 2/6] avcodec/flashsvenc: Remove unused 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: yQU2Gx5hR9A0 Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsvenc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 4cedb53fe4..d627b12351 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -64,7 +64,6 @@ typedef struct FlashSVContext { int image_width, image_height; unsigned packet_size; int block_width, block_height; - uint8_t *encbuffer; int block_size; int last_key_frame; uint8_t tmpblock[3 * 256 * 256]; @@ -95,7 +94,6 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx) { FlashSVContext *s = avctx->priv_data; - av_freep(&s->encbuffer); av_freep(&s->previous_frame); return 0; @@ -124,13 +122,6 @@ static av_cold int flashsv_encode_init(AVCodecContext *avctx) nb_blocks = h_blocks * v_blocks; s->packet_size = 4 + nb_blocks * (2 + 3 * BLOCK_WIDTH * BLOCK_HEIGHT); - s->encbuffer = av_mallocz(s->image_width * s->image_height * 3); - - if (!s->encbuffer) { - av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n"); - return AVERROR(ENOMEM); - } - return 0; }