From patchwork Sat Dec 11 18:37:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 32290 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp3354583iog; Sat, 11 Dec 2021 10:37:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWBRr1tF3N8jqBPjk+ohHPAmi4n2NMZXWlG/W9ubQcfT45JufSx/jHJxqVS2Jml3C2fW7Y X-Received: by 2002:a50:d68e:: with SMTP id r14mr48857787edi.5.1639247878947; Sat, 11 Dec 2021 10:37:58 -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 b10si12934696edz.201.2021.12.11.10.37.58; Sat, 11 Dec 2021 10:37:58 -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=oLkfLaPe; 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 6D5D868AE9A; Sat, 11 Dec 2021 20:37:54 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073037.outbound.protection.outlook.com [40.92.73.37]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8982C68A87B for ; Sat, 11 Dec 2021 20:37:47 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NyTaYwOF0CW/w4KOf1aoRCgeAvcbo4dcJRXXMkFG8EcjYoRUKYKmkWHABqTrybP5iBmtfpzlSjai+B/0zSso4ViFB4//DguGl4t3KLdEY9gCPM4AVthUHZB3Iacbds1XqtdZ3oKqgJTIcxD54OffdLzte2CD+2czm9POT5yDP+8EyQrO+ByKlFaUgjSai2fhOSxMCBTCP8HOcmEnhKcVHaSGJ9rtOxcqjrMcrbGdObBLbCN1boVmKSCANiucnu14ABP/ggdwd2C6q4Az3F71x+0t3a0KZxVvIddQvWXbS5qOWDgsN39z6vM5gT9fsgp3ujkuxVtlibhhHcOb3NpGJw== 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=xHLjxNLw3gVlutLiz+H3H3/4V58iTeFmLuLxq8D42GI=; b=BrCtU1vj9MOKOIQ8rgi75ZohFU/nee+x+AFdb/5iJ47TQF1isdIMH3VjmbSAA1Vdnk2fZZ4DSljrAKPoHh5cMa5ahcZ66QzFEKMN8lWv2APtFe7eDvo8+om6FIIghImLUYVgN1VpdofUpvI774fJPjaRtD3XN7b0zDDC2Qzk828BvKswliK3tTjN7cIGUU2V4CgV2kmoSBq4hTWyKj3VSJcN7uIdnMzf5IA2LOI8MdzxLnWoieQPYsAbWf7DA+hblGa4/qsAU3UDsuBdoKhULiHr8I3JFtKP49KB0VUSf8nZcjDQ882qQDeZaIFppTd3CbT+VUbz3pL1NaivBVKSow== 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=xHLjxNLw3gVlutLiz+H3H3/4V58iTeFmLuLxq8D42GI=; b=oLkfLaPedJWl8ITM94jTz0I+jIdxc8pgrhQVPtGn5GfJaE5H/q194rLKNfM9w5KyR4CVLUgu3yX6io+VkeDNDV4fDWeGOSTWktR5BY3MYUzgSc953bL/DS0pRlV8wuWTRUNMnR7oPZKQIopjFnk+FfpWt0ftIAw1CaEtNLCFD4XWgzPc+sOPLgQzjiI0179RYFEZCSvwVkA+E+M966xyLZiNI9wremBCOlD4C0hqFXQdblmN0nLYfHxq3N8H5wGGxJdEtyg/UTyiqjriCCLuxe4NvZaJHYLRYv7qIBIE2VlHnI5Zi5gXPzEdnNrhipVS0Cw73RhBofJLHf2l6XY1cw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM7PR03MB6450.eurprd03.prod.outlook.com (2603:10a6:20b:1b2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.22; Sat, 11 Dec 2021 18:37:46 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca%6]) with mapi id 15.20.4778.017; Sat, 11 Dec 2021 18:37:46 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 11 Dec 2021 19:37:28 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 X-TMN: [be1NOXH6ytVJw3WGiOzyUWheV0/9lqLr] X-ClientProxiedBy: AM0PR04CA0014.eurprd04.prod.outlook.com (2603:10a6:208:122::27) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211211183739.1430700-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0926a53e-54ff-4853-b885-08d9bcd55323 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiS9msLST/hR/FDB3IPfXlmi7UEzxfWRSPyhICK8BNYEA0ulUvS4fvXi2ERe92uwNWtXphtTeAfCzPE3cm55ghNZfg5V0UhMeeZaji1rTH8NW8hZAs1wt9bgdXldH/nW9HuSqQzbn0iih0wjnna2MBBxZAxbxKZb2Lluo8b+HH88teJGnT59n/Hw27gJ7vBPnmWOEXFJFyiJIgvBmO2bhwh3ZaIXg+2syvqfErMVv62a4fuX9nodcUbfxvhE6+ISrJD0ZgGEEw7EELstLjxrxSRw7Y0Z27Cl7s3ucJGqA64o94atUb4EqC1ifOzv6CE8X+Z2JVMEVmvdawb8TW3G6u+4/WMmClBDhwG3n9G+GXv14VQZeqRs06k2Y96qtpBc5CLvsvdE0AyoMv5Vu9DMtmPbkDntWwQtEl+ERpTw9NoBc59wUwqY0djgSjCuKsN8BBZp87wBJr0nVFGM07CpYbcEtDylMISr2hnHyYwk992nmUOeXB34R/kyOp/0dqosio+H2p85tKVAKU1lpaJqlFkF9YyMCDfQkdXbXpHO8vYrxa62DG6yECSdI/a/H5PDHdfWd83NhCF7A+Mi2yGS4sryU67oKtwJET3Xv3p0vHEeKB/bABJpA5vHgTy/2AkmQdYFDd10BbZmalXolkaVt4AoR2f6I7/rszAGVsj6T/DT0IEMkJYY4akvmooTvmbaIoXwo7moLl45DI/hpNfZ8cbrH26ipcEz0qO1rLGKBqgsaYo9ACILBM4ILZ7lHWqDq0A= X-MS-TrafficTypeDiagnostic: AM7PR03MB6450:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GQWik/UYCZvxEcy4Lvh/DXcIvW2Lzy1gNlpewnWLmfS3zWi/BIh6CnxH5UCVwwi6gyfyPZArRwglj+9wHNKfIAQ99XpY1fiE5GH+98Q7+5a2LIgktCSb56XUz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HBRScPVLTeu9xSiia2WitiFup2DiizUNUv55pZxw+3gOxeqZOUO6U0yMGjnndINSiXdchvxGaijlQl681UDVAC96OM5w71gJBPxT+XKCd0ZjBmKkA8+H/g8l51wlISw/OjymG4ZMu4QZD6kRct8PipRrPgeSDXjPpfWUM/xLya8N4luM02efIGmBxUVmBm3+f6KobZ/tcPxhB3nM5A6rtd0gDeREoPGg2CCn1pjhRwajgC4nwlSihzm3PmO56yzLXQwJIKFq7fdTma50lxzi4i8OPC6vA/mSbItGadcNcdVU/JraYjbVX1K5GpXrDuhdQO5UvTqTTwd+kqwZxZWnPYbvmG8vwgf6K7j7ExdGNuI2Fu7JpK/pxxHMCxuSTGFZENH72umh94ya4+VaTdGe1t1a5UcyLth8WFOamxuceQD+RkFIFw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0926a53e-54ff-4853-b885-08d9bcd55323 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2021 18:37:46.1366 (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: AM7PR03MB6450 Subject: [FFmpeg-devel] [PATCH 01/12] avcodec/h2645_parse: Remove H2645NAL.rbsp_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: 0rxe05ZaQLqi Forgotten in 03b82b3ab9883cef017e513c7d0b3b986b3b3e7b. (Moving data to the front is only done to make existing initializations like H2645NAL nal = { NULL } not emit int->pointer conversion warnings.) Signed-off-by: Andreas Rheinhardt --- libavcodec/h2645_parse.c | 3 +-- libavcodec/h2645_parse.h | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c index 6fbe97ad4a..03780680c6 100644 --- a/libavcodec/h2645_parse.c +++ b/libavcodec/h2645_parse.c @@ -92,8 +92,7 @@ int ff_h2645_extract_rbsp(const uint8_t *src, int length, } else if (i > length) i = length; - nal->rbsp_buffer = &rbsp->rbsp_buffer[rbsp->rbsp_buffer_size]; - dst = nal->rbsp_buffer; + dst = &rbsp->rbsp_buffer[rbsp->rbsp_buffer_size]; memcpy(dst, src, i); si = di = i; diff --git a/libavcodec/h2645_parse.h b/libavcodec/h2645_parse.h index 20a9d355f2..3a13ba248a 100644 --- a/libavcodec/h2645_parse.h +++ b/libavcodec/h2645_parse.h @@ -32,10 +32,8 @@ #define MAX_MBPAIR_SIZE (256*1024) // a tighter bound could be calculated if someone cares about a few bytes typedef struct H2645NAL { - uint8_t *rbsp_buffer; - - int size; const uint8_t *data; + int size; /** * Size, in bits, of just the data, excluding the stop bit and any trailing