From patchwork Thu Sep 7 01:02:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43610 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp295223pzh; Wed, 6 Sep 2023 18:01:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWklJ0YnEtA5wtakJvzme0wA1OAyvsQV4wYFVWMlemcqonb1JZeamipFgzPV9VL2FwOhDr X-Received: by 2002:adf:f20e:0:b0:317:573c:1314 with SMTP id p14-20020adff20e000000b00317573c1314mr3456813wro.58.1694048505592; Wed, 06 Sep 2023 18:01:45 -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 f3-20020aa7d843000000b005255db6966bsi9541344eds.621.2023.09.06.18.01.25; Wed, 06 Sep 2023 18:01:45 -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=Mpy4ysnu; 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 9A4E668C7B0; Thu, 7 Sep 2023 04:01:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2023.outbound.protection.outlook.com [40.92.59.23]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CD9DF68C683 for ; Thu, 7 Sep 2023 04:01:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Be7ITCC/3UnD5+H/TP3IE39ANQ/6hYpfJvbHc/sG74IZaYu2xZ6g4hqjfJEnFF/JTZLHnXWyPwQN7uVgassXoCp2ikUn7IABjVmua9WNqPpBSCkA+Oq7VQmu94W1q48ka3d58iHCmhp7zjuqCfgULNrPI7Ksx4l7f66TkLjCK8kEDAa96AAgXtJWA7kMzj9eFsQklYJ0CFjquY76HHLYHm7E9hSm1ItOkhHwLM5UaXYvT8NN8s+KHqY684Pm27eFkjFdZiJ8NWBcEbVENh/sy/XTt7WN+7uz6yCU8rAgAJrqhLSaVgePP8OOSqFe7r/mxXgMKWRc9PGxdOfXwQl1Nw== 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=e+g7pNs8bqJCN+0tWbaLOHi9Tim88EwrC7d3hwCvka4=; b=Qbqn5rvENJSrRMt08M6/sW+9FVPAxo9kizqsqE3/XzSMq8LtKYyhqkKn6g3J1ElcgnwBcL+0WTMbhT02bMBH+vb3w4IEy95Jjar9NpFYNXg8GzxuH7GZPsxnNoRlKxPooCtbwxN8tK4HdJVY2zf9yUrF2jx+g+Ba4OGSnnKsbvnWsBlPxtubl24T9z2CczfichWjSoW9QAkfegp4IZaXr9YtYx+mobDju1VNiLNbGHV3HLxhxvzfzgOoMJXbVv7KvMECfIQ7lhFUM4wXoCvl3X4yhFl69XdL9KAHEcG5sr2WhxvmftBHzoSkZj6PUe/WuiSZCyno4L+3G3DbkaHPyA== 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=e+g7pNs8bqJCN+0tWbaLOHi9Tim88EwrC7d3hwCvka4=; b=Mpy4ysnuuV9Y5h2OHsFi9zoPp4rgRkK9oWZH/P3ud9MtRp9g+T+MJlCtiUogl2ILKNrYZhbb1hexKYt/pME1AQoBtZ68Mcdj+e4J6xYlOtj/gd4fup+XMtDfpYqI74QeGWarU0Q2+/o60s9YJ4nR//FfsZwZT78OSc6tD8oZN1yd9B0pyoZ3x73QwWA7EM9ImNuBbn/LgnwXTF4ReucM0vQcJNDz2Hy8OJqRXffueTjJSkNxlaGsa8PPjSRSjR5dFw5dE5PF+8jWY5hvaMLDRJbi9E1nOVGdAGaBIVrKOAXrMwqXVOM8isIgywhqbMmf9FHYTd3X6fJCI06BH3yLng== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:01:12 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:01:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:02:01 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [gMt0nYS7uDoxh75knBYjOH6u8kxUuEtX] X-ClientProxiedBy: FR0P281CA0053.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::17) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010222.454612-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: d9a7f5c6-1b7f-4711-1805-08dbaf3dedf7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D5gitH3zci2eOXDK3h09NmIAM5E9dKKbjNJVqe4MxEWN5X3Wr4p5N7F8c/CWqYPoNBS+3YMomoScG9o7nsiDt+f/VbebgjzL8zogcm0XDNf/7ZC/5sc+rVGVrgCHAB3wQb4qWSikJH3oeztgHYRjn1XGSjtX5pn1CVxxNnFwqBqoipRSaqRBFDAhhqcwjM0f4H8/eCSya3qEFDxgdHNUh/G9yGDocf54Gh/OYxl6nZYYKjdsb0ioC+w+J366C01i4DiL4veZEd0TXZSUGTpkYl0eqJIlrQAxdVNNMSlDPD1N2AxrJUD6i8JeuAY5iGC31uLK06fHISyrWbthqeoYO7qfqSprlVGwnjxz5goW/BuBLkcMkn0bcmBRTT+Wnd13AOoNCY+VhHhoHZn409X2PbiCmrN9SnWiV+juQX5+/ipQ3XrUi/N1hMbK3y1LM0QHtJbUbibKzrF7DlK4H8kUJG+4oWkTnIE7MNtqb+Z2Y7aO4q+7HjWDB6Ttmp/sMlfp9XG30dUpyAi8ldG+OPZ7KNFyeDfC1HO003j7cwXGkSFH5pTr1bNjCNnE1OvnD6pS8CnNFEZ8skXQ9irTS69kIjkt1mwMyPPbHTFZI8SEiOU= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /dgGHcLNaTIRRrZo/2BTmwFWgeuybR34Iagl4rjGISmDbtxy1CjtfX6nbcjtvVN/3jA7vk2j1Sj5sbJKyDSDm6chna37jGhqTSFOvSuzKFMa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YlGS+4Y01sGPhh8/uJ62pgCKNH06ROF9MbcDMUCeRCl+7SgB5FcvjYgP4PX/gvOpj5xfy4oAoI4rDKuK X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9a7f5c6-1b7f-4711-1805-08dbaf3dedf7 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:01:12.5882 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 01/22] fate/demux, lavf-container: Workaround for AV1-aspect ratio issue 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: 2S7JjV54eCT+ This is a workaround for an issue introduced in commit 1652f2492f88434010053289d946dab6a57e4d58. It is not meant to be applied to the tree. Signed-off-by: Andreas Rheinhardt --- tests/fate-run.sh | 2 +- tests/fate/demux.mak | 2 +- tests/fate/lavf-container.mak | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 5a71ac001e..276f97489d 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -383,7 +383,7 @@ lavf_container_fate() file=${outdir}/lavf.$t cleanfiles="$cleanfiles $file" input="${target_samples}/$1" - do_avconv $file -auto_conversion_filters $DEC_OPTS $2 -i "$input" "$ENC_OPTS -metadata title=lavftest" -vcodec copy -acodec copy + do_avconv $file -auto_conversion_filters $DEC_OPTS $2 -i "$input" "$ENC_OPTS -metadata title=lavftest" $4 -vcodec copy -acodec copy do_avconv_crc $file -auto_conversion_filters $DEC_OPTS -i $target_path/$file $3 } diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak index ace8fa0b52..7a091de851 100644 --- a/tests/fate/demux.mak +++ b/tests/fate/demux.mak @@ -14,7 +14,7 @@ FATE_SAMPLES_DEMUX-$(CONFIG_AEA_DEMUXER) += fate-aea-demux fate-aea-demux: CMD = crc -i $(TARGET_SAMPLES)/aea/chirp.aea -c:a copy FATE_SAMPLES_DEMUX-$(call DEMDEC, AV1, AV1) += fate-av1-annexb-demux -fate-av1-annexb-demux: CMD = framecrc -c:v av1 -i $(TARGET_SAMPLES)/av1/annexb.obu -c:v copy +fate-av1-annexb-demux: CMD = framecrc -c:v av1 -i $(TARGET_SAMPLES)/av1/annexb.obu -c:v copy -sar 1:1 FATE_SAMPLES_DEMUX-$(CONFIG_AST_DEMUXER) += fate-ast fate-ast: CMD = crc -i $(TARGET_SAMPLES)/ast/demo11_02_partial.ast -c copy diff --git a/tests/fate/lavf-container.mak b/tests/fate/lavf-container.mak index 0d4a224601..047dd1d7f4 100644 --- a/tests/fate/lavf-container.mak +++ b/tests/fate/lavf-container.mak @@ -86,8 +86,8 @@ FATE_LAVF_CONTAINER_FATE = $(FATE_LAVF_CONTAINER_FATE-yes:%=fate-lavf-fate-%) $(FATE_LAVF_CONTAINER_FATE): REF = $(SRC_PATH)/tests/ref/lavf-fate/$(@:fate-lavf-fate-%=%) $(FATE_LAVF_CONTAINER_FATE): $(AREF) $(VREF) -fate-lavf-fate-av1.mp4: CMD = lavf_container_fate "av1-test-vectors/av1-1-b8-05-mv.ivf" "" "-c:v copy" -fate-lavf-fate-av1.mkv: CMD = lavf_container_fate "av1-test-vectors/av1-1-b8-05-mv.ivf" "" "-c:v copy" +fate-lavf-fate-av1.mp4: CMD = lavf_container_fate "av1-test-vectors/av1-1-b8-05-mv.ivf" "" "-c:v copy" "-sar 1:1" +fate-lavf-fate-av1.mkv: CMD = lavf_container_fate "av1-test-vectors/av1-1-b8-05-mv.ivf" "" "-c:v copy" "-sar 1:1" fate-lavf-fate-evc.mp4: CMD = lavf_container_fate "evc/akiyo_cif.evc" "" "-c:v copy" fate-lavf-fate-h264.mp4: CMD = lavf_container_fate "h264/intra_refresh.h264" "" "-c:v copy" fate-lavf-fate-vp3.ogg: CMD = lavf_container_fate "vp3/coeff_level64.mkv" "-idct auto" From patchwork Thu Sep 7 01:05:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43608 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp296681pzh; Wed, 6 Sep 2023 18:04:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBbvFKxOZeAOioNuRSJ7p3Jbyu8jzE5T3zIbJKSUCLW8ceUK9z0A8Sl02iCcKSd/YX3dgx X-Received: by 2002:a17:906:51d7:b0:9a1:beb2:1cb8 with SMTP id v23-20020a17090651d700b009a1beb21cb8mr3733935ejk.39.1694048689098; Wed, 06 Sep 2023 18:04: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 ks8-20020a170906f84800b0099bcf1c07cbsi9878624ejb.883.2023.09.06.18.04.37; Wed, 06 Sep 2023 18:04: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=ToOTSBKS; 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 3ADA668C7B0; Thu, 7 Sep 2023 04:04:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2099.outbound.protection.outlook.com [40.92.59.99]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 20E5168C2FB for ; Thu, 7 Sep 2023 04:04:28 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kaqX/Dlxgiy1wBkuSBXuGZj1FTZ3nx4Es7KDaKVwVsK+FTpjd6aPfFeaX0t4JUkynB26/rpVLoauMQ+w1kBTq+sWx20eZAN6HWjSeDw4fmaaUHWEJj9l/TMrBowaBU8z9nh2qKAOm6UJHiZ5aHIQt9tvP5xdvw/SHGLO51cc6ezJpe3p6afJBW/6OIpGXG0jp9o3t+0VczikUWUFMG+jnqGFuC7cGoHobVtYvtLdMJDZ4zmZvIWG1B7nSYGCSMsiLW5wsrcv8w3RxN1W5ZymEh1BJ8qmAXX9mP/q2oDgDyuBL6p04GIQK1AHvIQ+o2rOWmmVMDeonCiNe3rJrlg64Q== 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=t03f7CfqK5fa43LsBJ7FNZQC0PpevENZifMUSKY8RA8=; b=HKS6hHAIicmpdfMty8AifTldjjMTzlI4TBWo12mf5TRojsEQGtaGbjDsaMPQoxHSMQfYHOBoIiL5AWta2nD9k5UX872DUEh/n8MU8Mf6U32s3PreL2KUgqg3MLtwDd0e9L07DOGp7Z18fXxCWNmfgg8AkGtfwmsi9WxrcwpBJxXHKDcTOB0rJQjjCypya9uwr53Xm3eO91AXQoRgVJIs0ZeQ45EVJ2sw8AY+6wLQKyJCHz/YOAAEYe0t0xM83xJVFn0DnlwWqHwkjjIixBVey2wE7ImyLnikfIpYmHhor4sv2B6nEcSweT8tW95cSZjeU0LZp13j0L2U51TFkiNiYg== 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=t03f7CfqK5fa43LsBJ7FNZQC0PpevENZifMUSKY8RA8=; b=ToOTSBKSt7VmU3XWL5RBB3vMOGTCjebtMiXaHU49nNK2Gg/H20szJn79ujEk3wkSvdIwya89A8jMOL/f1lI3IbP8u0gEmizlYgBsIFyN84FP/Lfd8R5IaZep3OWu9OWbSSnnZf0LXBfqlRzI/2toz0IO3KsYheKx4nY1HqYBVUQqXVOoIxaeOgAovfKq89qZUnmf/1w++2Qi6LT2EoN+PYWM242MZ5L7345qmRxEjAch56UrsMIeUbS2MLTjiCOy9MqGZNIMba+ghPdfU1/GAErJmuYdHUCOnVmiUlsriuTRnXiGnK3rHK0t7ngjcOGZ23rQCQMlHZq4wU4Uwp8LZw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:04:26 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:04:26 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:18 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [miwWbHwTDRtBET65rSF8GVi8cHqCERug] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 42f19e42-f652-427d-0c7f-08dbaf3e617e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 16KGMKo4OeGf8bAHAUIjVDvVQbXyG+XeTpHQ8AXwE2VzhdAWwwJJ73n7L8+uCTL4AYld9lWlmAGicSB7mByK1GMTtMGWkV1rHmC4fgOcg++qT/KytoL0xp8km4tgkA6YgUkA8GE3zGYPyJN1q2Nyl+w8njtis9Ot2cb+/Oo8suHO4UWDcMI3lWfVvSAiD6H1i2xSReYA1wrkSsuMi1xicZm4TTkSu1z3HjIry3Qs2El2f9X/KuoWoz8LjVbor8OL3WK9cCWGIQhgsX1zhwumW6YcEQrKpxYfs5OEQ71DpghiwosCiFmvgaBNkRVM89y3ZzAfwWPVhRmlSLHXjGwMxlwbbXn6yzTi8AOyIOobvrg6sMcPyukMX5NYbru3hOygbC3uqTWXjI58wzf8WBcPvHWtekCpRk3vyh1nXBy1poGyOVAdanALdMEB9dfmQyhYJBW7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ZRn2v4RhNLft/b+W0BMOmpBgI8rE8eOA+RSibEjWz28GhQxhWIDXuo+Gdn3NMLAMEzTNvBL/dIesJ7K87e2JWXk++2RT3A7W+9FDxPLh8SCnNX3x5nZbg4aN3g4RFOOzqfFm9fXjtpZqjl9xznvrsJyQfx+/jm0fqv1d3cPOvsaypKtc92o8+GvzrQ3rph/i3ZhdUCHMShDpKRWoguUxy91HFToK8pgX3eO+wvdXBmK2CwMoIZioej3Z0C0uxGcknmLXTxGnvE7JwYqnb1laoRA6cpb+quiSjq7XnrW2BTN2lfZXba5+zrfKWV7XQR3mO/vgaTzRGTpxbm4s9g9xqsarS4p1vEhkfvsm11tnd96YxV5k+3iFRZbWzgHtXn9zqv6F17h0kjRyUS2z5PX+D+LNtd+l7nfb3zAMsaVywMZsF0n20zuvpjJrN2Jc2 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42f19e42-f652-427d-0c7f-08dbaf3e617e X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:04:26.7594 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 02/22] avformat/avio: Don't use incompatible function pointer type for call 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: Zm17CwFjvpY6 It is undefined behaviour even in cases where it works (it works because it is only a const uint8_t* vs. uint8_t* difference). Signed-off-by: Andreas Rheinhardt --- libavformat/avio.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index ab1c19a58d..d53da5cb0c 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -354,10 +354,15 @@ fail: } static inline int retry_transfer_wrapper(URLContext *h, uint8_t *buf, + const uint8_t *cbuf, int size, int size_min, - int (*transfer_func)(URLContext *h, - uint8_t *buf, - int size)) + int (*read_func)(URLContext *h, + uint8_t *buf, + int size), + int (*write_func)(URLContext *h, + const uint8_t *buf, + int size), + int read) { int ret, len; int fast_retries = 5; @@ -367,7 +372,8 @@ static inline int retry_transfer_wrapper(URLContext *h, uint8_t *buf, while (len < size_min) { if (ff_check_interrupt(&h->interrupt_callback)) return AVERROR_EXIT; - ret = transfer_func(h, buf + len, size - len); + ret = read ? read_func (h, buf + len, size - len) + : write_func(h, cbuf + len, size - len); if (ret == AVERROR(EINTR)) continue; if (h->flags & AVIO_FLAG_NONBLOCK) @@ -402,14 +408,16 @@ int ffurl_read(URLContext *h, unsigned char *buf, int size) { if (!(h->flags & AVIO_FLAG_READ)) return AVERROR(EIO); - return retry_transfer_wrapper(h, buf, size, 1, h->prot->url_read); + return retry_transfer_wrapper(h, buf, NULL, size, 1, + h->prot->url_read, NULL, 1); } int ffurl_read_complete(URLContext *h, unsigned char *buf, int size) { if (!(h->flags & AVIO_FLAG_READ)) return AVERROR(EIO); - return retry_transfer_wrapper(h, buf, size, size, h->prot->url_read); + return retry_transfer_wrapper(h, buf, NULL, size, size, + h->prot->url_read, NULL, 1); } int ffurl_write(URLContext *h, const unsigned char *buf, int size) @@ -420,9 +428,8 @@ int ffurl_write(URLContext *h, const unsigned char *buf, int size) if (h->max_packet_size && size > h->max_packet_size) return AVERROR(EIO); - return retry_transfer_wrapper(h, (unsigned char *)buf, size, size, - (int (*)(struct URLContext *, uint8_t *, int)) - h->prot->url_write); + return retry_transfer_wrapper(h, NULL, buf, size, size, + NULL, h->prot->url_write, 0); } int64_t ffurl_seek(URLContext *h, int64_t pos, int whence) From patchwork Thu Sep 7 01:05:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43611 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp296786pzh; Wed, 6 Sep 2023 18:05:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhYEr6EYh7Fptp9vZQjq6gcXG+TWMZM9khaYuoSr48v/WQPkoTADy4VIs9Uy/QWVOWytPv X-Received: by 2002:a17:906:1da9:b0:9a1:b950:abab with SMTP id u9-20020a1709061da900b009a1b950ababmr3713161ejh.32.1694048703016; Wed, 06 Sep 2023 18:05: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 h12-20020a1709063b4c00b009a63cbd4affsi6501537ejf.937.2023.09.06.18.04.57; Wed, 06 Sep 2023 18:05: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=Jq6GXQzG; 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 4460068C69F; Thu, 7 Sep 2023 04:04:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2087.outbound.protection.outlook.com [40.92.59.87]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7C2F868C2FB for ; Thu, 7 Sep 2023 04:04:53 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KAW+jvCXvVA6D4i/pqhbRA0x2kpbtk7FY8ap3pm1mMoLhMwrfv6qu0RV2E4WZTVKwodTQnLF3bl/MMXf4xJ1xUFjOrBxcEDFhv4mF1MY5bOj4XM1O3nTUUdK1Lu9U7Iz7AQKgoqzmDTAQwfFwt9a7HHJWI+TrCk3N4hsXqlo8XwWj+YuuyxHTvkTvTE639qcSKV5DCJurOCGPHgHA0e81mXyhekG1neUybRkKzI5G1lfCFMtB5HrfsAnXVNC1npRkpZnvdBC8H8mCvkSkerQws8tyBi4QM/g8bQQBztdsl80K1lJN6QflJQuGdmJVfaP2YCvg1mJnyDH1+lnZ07oSA== 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=xpdbvtZVrw+cGtFKvPWUAmlqElKxk/8zYqCdLCUCnZM=; b=atYzVZO5yf95DUFJCXFL6voym/xDVwLetpOkFuyDLN+vYs3wW+ggi3HtVTdCytOzzZNl1jyHK70d/SPHDn7toTwpYAiA3Zz50mPc5RfZ1o/lGXiZA8bHA8JQAHEVFeWAcllk9sp2v3MSEpwchXnBVUOX/6A9OTRbAhY0KynRga5lzWht2fGWciUiXiRZ3mFIuyZXJJUoNa05ISF+2LoYHs4fcvSt07BY88vVEPfPHXCE4uOgFo4ZJyJJFXdh08oajsvwlhOtXebsG8NAhcCQWNbw6ppLU3F0AsT0E69fXEltUaMyaTIylnxNWwC8B6sPz1Zz0RpBRwq1YvTHEYPndA== 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=xpdbvtZVrw+cGtFKvPWUAmlqElKxk/8zYqCdLCUCnZM=; b=Jq6GXQzGuAoYn0XNceXdmtlJXqDD/aSYkotNi05tfiUeTHKXIpSfP3YmrzoDOPhQmiq2XU416uUuS7D+KuiKvPaqntoSKeMOviH1d5hNras0kU/q13TLW4YPwx5bQaV+mXWADqjW7mLFY6SlkJSwOAdxTDR6lUsfDWNlnT9FcQdZkG1wGuYSaXiz/xwcQXZLyejiRz5lJjzrLtWm9eFudlg1KOqkC33z2uywka1VYmE42JKYuEZD+/uBqeR8DmSe7LkeaoDqxsGOYRSwagbPoQ4KJ23Tgv1ZtFwqSqF2zasLRkNc9CVlo5uj7ZEyG9yzO3mxDi14w3IiDdjjZTIHiQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:04:52 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:04:52 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:19 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [gDW8CJmHPZNvYzJLqTms3X/lQ5C/LKtZ] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d16df20-a012-4a19-4e45-08dbaf3e70cf X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +3UW7BaBAhF6lGFC37k+95wYA4rU3jLdPmaS8s25CNqEaXeIYudTVmcZWBkpKhJC5mPHg9WsXPCRNIiRR5uywd3K2MNIF9Y/qWDFg5JtnV/v/GvgP/i0UZ/ze7zWpJInQpfXaC6aBr33ZcjqwaMt5Uv0/T2rRZg30ep89UJz1/Fo3+FrfFsU9W3avhiPX4PiXXRNWGesgGbrkPvrZqv+8yoCihZsujox5g96kcDWvbqlCUnxK8BNtq4BjsY/qM2Zx6eRrOyJwsvy8TF3h4JTULvsYNdalQHT11Fix98JJzYHNsLEhZa0aHSNyOu5jRfnj7H1mIiVOVaZLXHKBo5CsX2FU2ejayrZheC615rR6gZGGxnJlRLAwli0Md7TTt1XjY0UX92Wp3VjIvrT4iqDmZIvYHPb/BWY4wVofei9nGBq8nYevPd6KOHsSLKcsq5170AQ3m70nwg03n28J6eIzXLpu9TpYsZISu3uY06aKMz0UCxNpFCs14bJC9Xp38bwU9Lh+q6fwCtoGxti2et4K9iF1qUGrvrOL7xN63IWygYlAQit3lgYauwH6TsHsSPqZI+QsQQ+uKk8YgIZqBmVX2DchLDmU/V6e/Axfj9G+FV/BkwOEir903HUaXgt4rbD X-MS-Exchange-AntiSpam-MessageData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knB4WY7tKGo95jbGFcaFLumFfdteS1AIZDTqukGeExCB/pmuKKIdoReSA01DTRkhSWVfwycUkYLPUn7iQEMmMEYFNQ/uoYf4U6SMXh7+UptRfRvxT9KjXuyVc6VzIDE6ZTtTZFb7JuD+GF2yy7dGObod7+VfS9vOtIIfIWd6uvqYLYGtqqKdK/3HU2BvYQZvRqIojyTTyL8gZwVHUJ8/WvhWKc3tzbsRb+RiDPYkYajhom4i X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d16df20-a012-4a19-4e45-08dbaf3e70cf X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:04:52.1136 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 03/22] avformat/internal: Avoid casting const away 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: xdRD6kK752pA Fixes many warnings when using -Wcast-qual. Signed-off-by: Andreas Rheinhardt --- libavformat/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/internal.h b/libavformat/internal.h index 051e8e2893..c7512898b5 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -418,7 +418,7 @@ static av_always_inline FFStream *ffstream(AVStream *st) static av_always_inline const FFStream *cffstream(const AVStream *st) { - return (FFStream*)st; + return (const FFStream*)st; } #ifdef __GNUC__ From patchwork Thu Sep 7 01:05:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43612 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp296909pzh; Wed, 6 Sep 2023 18:05:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHY74YrOUKYlm9uSMBQQAcw+FEC7Qbx/GGAToMNo5/zQJ6ABHOy4gQ6gQe6uM1jJi5EViwC X-Received: by 2002:a50:ed14:0:b0:522:b112:6254 with SMTP id j20-20020a50ed14000000b00522b1126254mr3326169eds.4.1694048718499; Wed, 06 Sep 2023 18:05:18 -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 ee49-20020a056402293100b0052e58061d4bsi3897844edb.201.2023.09.06.18.05.11; Wed, 06 Sep 2023 18:05:18 -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=IPEC8Wx7; 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 579AF68C831; Thu, 7 Sep 2023 04:05:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2016.outbound.protection.outlook.com [40.92.59.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EBDD668C751 for ; Thu, 7 Sep 2023 04:05:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nlUiqWLXGDZ02TxnijljiRFH85JEU23GrTGfIFpUkn47SfChSk6k5PgD17aVADJ+IpXgV3RTVl1enStpSFi3iEATJ0/amHKmERM04u2Ah81v7KA8eo4rHp0pPwVySJDvxRVnxZUOTvOhQOY3d05kXbHQeD3is0clwGzLSC1Qg1Ss2bvcvW9FrWKiFpvB6qev/mOWKIh9yGKYb39VWISwQuzFC+FyycVl93aVglZTjZNlxuB2TXiCMp/FZI9WSbi5qdBQW3uB7+Mqx8rnW+XphUvWu/6aXx1arFa7fIM1Rl6fAvS1pbfffqfiA0J0YFr4A6m6QcBjxwRXZh6kYbFBXg== 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=6M7GN+F4hNvceC3kO+g/9K8tZJE1d2Hu8rmYAIUteEE=; b=GC3okUBn1BzeuTE1tF3u67+ZoQsM8ws7Qf1d8OMF8DRXLHZwfaB8g28zaujY/AnmDM3eDV6ibt6D1winkQuqaOji/mugxSycMFy692qf1NELMsiGXphe7kzMgeFPQxR9ASXVWXrcyl0H5Kz3HdqfdH65XC/JVcKKbuswwmoG1ILZXJjc2Uz08jUMRXQ7hPY2+0B5U2NzVWgZH9rL5C2/72+BnkhoA0e4cWhOLuKbaejMhlMWE+TGFY2yqAcp040yDEOXQlbpwPt4lGewqsKl27le6OB8rsk7UakVg6hX6xbs5OFKlujSg0wrn0zkYu4H3lnvGu+dXEBIjwyVHW2s5Q== 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=6M7GN+F4hNvceC3kO+g/9K8tZJE1d2Hu8rmYAIUteEE=; b=IPEC8Wx7y8imtaSBjvxMWjMlZSmEisau1R9cPZMd6KZ4A0zW3PRvtOMCsgnjZnoZRjQc2eQyPDDNlPlMrYRxOryNYA2wAD7Uo6TN8re5UmD71T0LPu9+ib2xub8cfsibe/+zHTPAEumtan0OcXHc5tBKat86jedWL4Jv3dT3RCZsNojc+aCU6R3HiMn83ffAvRKMGg2aWxVQmVob/8gXzts7ixRZ9GUbeemEQdpoVegWmbp0utEOMjdnCHoe3nASrAFm3XKPuJfUNfasb42eBx9s4dHf44IGwQJsd/F4oD/wmN6Ylrw8K3NQGdyYxFAnMyNsjGGqNBavx/U5DmR/bw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:05 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:05 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:20 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [vXZElQw0ZPu6PROZ8NqvxV0a6pueyLfl] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 3bf667c1-405d-4be3-320f-08dbaf3e788c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XmehqzJ/oI10/5VSJnauEbX28ikaVf5Qj0/syXvuQTwPscfHaPpsd8Et7w0KCBt/q5/MfTl9K5KbUMchT7ru0I/RT/65qPsqompOuUJL0j23pHJqi3Gh+RsagUX47HFfFrtlw0mq1Oebtsawutx+2uZ4OXXMf4OWrrNcInlDV84hlqNqPvQnEU/K8QzMtelokI9xmbviKrbsYIRPzSawdXoIodjugYdyfnIKBHxBlsA1sAgFTxnDaiiVCYdajZ0EGKp4fUYpW44xA+XxkrI3kqqQyV8J3KgI7//Ho4q0WYxL5+4rfSwQ33Y4pZAi8QP6mqdZe+x8i8r9Gly0I/yy2VWpbPGE94YDlM7vwz9tKdAEcUHi83GUlrFW+LsSgGH0zGzs0V7bd7mECi6BjQdg5yfPkczoRrskFVEE3qlbp/zaVWlZOR91hzOTOQv/KEG43sim5jfYAC+YVDt0qdOGUUrSEN7Svv6GQljv235HtwAKgdmRHtglNwSWiigivyYWV43jxHQKRPoNrZIy8mvoBj0tRt37jE246yYZZD4cBOIMqkBoxjz20cuCPlizMGvViE0Zqjz9ubu4tl642a4x8H5Q8Gr3yqF2pjVYBwPWfI/foUiy71BaXIJhj+/Rthaa X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dlnsG46VtcOOOVbo0rR+TjMdbGezBIrP9MIYuSNcbRcY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JL09gT3ZHeR1ZYNDDn7lf5sLTauaMMWFDn3WzdDU8nfIhlQTrITKBinItoyV6BDLp1r2aI1kdTQ842XDs9UE+csmrBu5qa5E1nDaXJBRpflVdPq05maeMcQYkcDH2dbHzpsIPNxnZL2As6+VPydr8j1ulbXesd8KyNyk X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3bf667c1-405d-4be3-320f-08dbaf3e788c X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:05.0540 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 04/22] avformat/aviobuf: Don't use incompatible function pointer type for call 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: og1p26U9ddi1 It is undefined behaviour even in cases where it works (it works because both are pointers). Instead change the functions involved to use the type expected by the AVIO-API and add inline wrappers for our internal callers. Signed-off-by: Andreas Rheinhardt --- libavformat/avio.c | 15 +++++++++++---- libavformat/aviobuf.c | 6 ++---- libavformat/url.h | 20 ++++++++++++++++---- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index d53da5cb0c..fd40f9ce43 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -404,8 +404,10 @@ static inline int retry_transfer_wrapper(URLContext *h, uint8_t *buf, return len; } -int ffurl_read(URLContext *h, unsigned char *buf, int size) +int ffurl_read2(void *urlcontext, uint8_t *buf, int size) { + URLContext *h = urlcontext; + if (!(h->flags & AVIO_FLAG_READ)) return AVERROR(EIO); return retry_transfer_wrapper(h, buf, NULL, size, 1, @@ -420,8 +422,10 @@ int ffurl_read_complete(URLContext *h, unsigned char *buf, int size) h->prot->url_read, NULL, 1); } -int ffurl_write(URLContext *h, const unsigned char *buf, int size) +int ffurl_write2(void *urlcontext, uint8_t *buf, int size) { + URLContext *h = urlcontext; + if (!(h->flags & AVIO_FLAG_WRITE)) return AVERROR(EIO); /* avoid sending too big packets */ @@ -432,8 +436,9 @@ int ffurl_write(URLContext *h, const unsigned char *buf, int size) NULL, h->prot->url_write, 0); } -int64_t ffurl_seek(URLContext *h, int64_t pos, int whence) +int64_t ffurl_seek2(void *urlcontext, int64_t pos, int whence) { + URLContext *h = urlcontext; int64_t ret; if (!h->prot->url_seek) @@ -654,8 +659,10 @@ int ffurl_get_multi_file_handle(URLContext *h, int **handles, int *numhandles) return h->prot->url_get_multi_file_handle(h, handles, numhandles); } -int ffurl_get_short_seek(URLContext *h) +int ffurl_get_short_seek(void *urlcontext) { + URLContext *h = urlcontext; + if (!h || !h->prot || !h->prot->url_get_short_seek) return AVERROR(ENOSYS); return h->prot->url_get_short_seek(h); diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 029a9e966b..ad5827f216 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -976,9 +976,7 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) return AVERROR(ENOMEM); *s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, h, - (int (*)(void *, uint8_t *, int)) ffurl_read, - (int (*)(void *, uint8_t *, int)) ffurl_write, - (int64_t (*)(void *, int64_t, int))ffurl_seek); + ffurl_read2, ffurl_write2, ffurl_seek2); if (!*s) { av_freep(&buffer); return AVERROR(ENOMEM); @@ -1006,7 +1004,7 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) if (h->prot->url_read_seek) (*s)->seekable |= AVIO_SEEKABLE_TIME; } - ((FFIOContext*)(*s))->short_seek_get = (int (*)(void *))ffurl_get_short_seek; + ((FFIOContext*)(*s))->short_seek_get = ffurl_get_short_seek; (*s)->av_class = &ff_avio_class; return 0; } diff --git a/libavformat/url.h b/libavformat/url.h index 3cfe3ecc5c..bba1a9a1df 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -170,6 +170,7 @@ int ffurl_accept(URLContext *s, URLContext **c); */ int ffurl_handshake(URLContext *c); +int ffurl_read2(void *urlcontext, unsigned char *buf, int size); /** * Read up to size bytes from the resource accessed by h, and store * the read bytes in buf. @@ -179,7 +180,10 @@ int ffurl_handshake(URLContext *c); * indicates that it is not possible to read more from the accessed * resource (except if the value of the size argument is also zero). */ -int ffurl_read(URLContext *h, unsigned char *buf, int size); +static inline int ffurl_read(URLContext *h, uint8_t *buf, int size) +{ + return ffurl_read2(h, buf, size); +} /** * Read as many bytes as possible (up to size), calling the @@ -190,14 +194,19 @@ int ffurl_read(URLContext *h, unsigned char *buf, int size); */ int ffurl_read_complete(URLContext *h, unsigned char *buf, int size); +int ffurl_write2(void *urlcontext, uint8_t *buf, int size); /** * Write size bytes from buf to the resource accessed by h. * * @return the number of bytes actually written, or a negative value * corresponding to an AVERROR code in case of failure */ -int ffurl_write(URLContext *h, const unsigned char *buf, int size); +static inline int ffurl_write(URLContext *h, const uint8_t *buf, int size) +{ + return ffurl_write2(h, (uint8_t*)buf, size); +} +int64_t ffurl_seek2(void *urlcontext, int64_t pos, int whence); /** * Change the position that will be used by the next read/write * operation on the resource accessed by h. @@ -212,7 +221,10 @@ int ffurl_write(URLContext *h, const unsigned char *buf, int size); * the beginning of the file. You can use this feature together with * SEEK_CUR to read the current file position. */ -int64_t ffurl_seek(URLContext *h, int64_t pos, int whence); +static inline int64_t ffurl_seek(URLContext *h, int64_t pos, int whence) +{ + return ffurl_seek2(h, pos, whence); +} /** * Close the resource accessed by the URLContext h, and free the @@ -251,7 +263,7 @@ int ffurl_get_multi_file_handle(URLContext *h, int **handles, int *numhandles); * * @return threshold (>0) on success or <=0 on error. */ -int ffurl_get_short_seek(URLContext *h); +int ffurl_get_short_seek(void *urlcontext); /** * Signal the URLContext that we are done reading or writing the stream. From patchwork Thu Sep 7 01:05:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43614 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297061pzh; Wed, 6 Sep 2023 18:05:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJ+AllXkOKxpNyLfAwG2ofJU06BzpXGnmIEnVZEp7ysv/IC3XbNWDOw5K0Mz7r/ZyPjnW6 X-Received: by 2002:a17:907:a06f:b0:9a1:cbe5:758c with SMTP id ia15-20020a170907a06f00b009a1cbe5758cmr3516292ejc.7.1694048734436; Wed, 06 Sep 2023 18:05:34 -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 fy37-20020a1709069f2500b0098e1627c0e4si10602933ejc.777.2023.09.06.18.05.24; Wed, 06 Sep 2023 18:05:34 -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=ATwPAhjv; 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 65B7268C809; Thu, 7 Sep 2023 04:05:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2058.outbound.protection.outlook.com [40.92.59.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 64E0C68C6F8 for ; Thu, 7 Sep 2023 04:05:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FUMQMoFTigikCyuJa5YBY6KG+Iw/PvA4JtkH1df6adO8V+4wHn2OVNgth4ZuBmXPjFKJtS9tVVr2j7xG3qNFq6j2Dnt+hqYzlpaXwbjhIVN4n3PPGs8V354XwGigPW1+lP8F/0fduwf+OwbZ0rX1JBK+rt7hgJjQd2tn6P6s3GSvem5ZyfEKC6e7vuQLkqWNi8px8bgal1uh9O5orW3NscvTz7q2eI7/MZMwkfcxqNQSE36pSFrRLSdAVJHNgchv5dCzAVKsOJg2A8TQXp9RpkL7jgInhi7uRe+1SbteoyNVRutYmC2vBXFY1gNOXbndluDcsQ+y+TSaP4D/wEN5OQ== 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=sO6r/IpcQOnwlte0Vn/LpDx+PnUC0UOIVnl09f8p5PE=; b=LKLbMIGrPVJ9KQf9UAsdoBpbRo+OrG2yh2smbk04Uz2EFrMvPBfTI+pbH31+0C+5Xefb82q/Rs/LSintRcoL/ipy9Fn2XSezQHyMI7kU0ADgqnL3rNz4ya8OHf0kTiY4NUy/Ze00hBmw7ch7Qja6duOLteUB1XDvmfGyThG4IkMSYxpv4vV8poJPZZoXDL6vTZj86NWmUk0ffhhwJ3Ozfg2BMuDPLF1XOY2QmfNTU+3HofDZOmXMKg5QepSEFXpFiWaj7AprT3521yO1bHiIamN9o2LdLFl8c/Su2bBZj6+rq0K/zt4nQ/YnvJipUje11phwODdXn6cigMTWBnOwmg== 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=sO6r/IpcQOnwlte0Vn/LpDx+PnUC0UOIVnl09f8p5PE=; b=ATwPAhjvC6vMWViIfOESy+i3oOoBLaO3oU4R5pTjezKdtiAqfXIVogeTiJ3OIN2dC030fmr9+K0ma24Msjam04lYlUH7fcWblxisWYnUZ7w95N6YdCToud7G1JuvpoiFxJkxl7mNGbu+1doUqQhKqHtMNssK/zQ/HW5P0Vf+PhLK6gPXv3OmM2mEK+44MfsxJVKfhtvMLUx19fiF8Ag1+sQPqWkvYMjvmbXT/I2aD+9Tj5E4PptDY/yV8dcqVGdhraRRa8jNXddWskto8rEMOn4sJ9SmzT6DEt8Cz1MSyJGB/qU4V0vbO4f/+fRu3cwd/4fg7z4yXhTE0s1oKuzFCw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:10 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:21 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [YPMuTVPfUML9kuE0vfn35WS7tM4F+8H6] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: aabe0a11-c43f-406d-9b41-08dbaf3e7b84 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OeRaueIjqnujbr7f8VWLlj/n2l52a+yKhOKsn3P33GXlLP7dhpEh/XqZWmVCB/vKu4agBcOIfhCYZlO1MBOijNSzasnI0c4OTmwWYTbtvW/25UQlN57KWCkVUuFdCOCNdytK986Jo3VxxRrxXScXNdm3qV6YtyXHerlSTqzY1pYBXLd1xvrWiZ5mEjUw8P2lIVkpi0Wg1tCY2QgErgx7DzO/8PSAOtPF6EVl7jqnjKKPZSSw8aZMN0By53W71RgXsuthN/JutcQOortx5amu3cAkTo0hFD/Xvnv0yjC4J935HdzzsQxURdevLTKRm6q3DaNv6DN9fX6vod7i4sRGmjX/aEX5x9p0+farq1HQElJOEKyyiwNMAnFqQ3pQXCXp6fqkfaPeli0S5Xa8OU2bBxN7YWpZ2f8w2w7aK58hqw4SR1kovrMk9ii4zPY1kDJSS13+3Vzf8wiLtl57pmgMTvhvlf/E4BGE925S9Z5ZeZfVJQK9xlw8VQYFTUNEzUM6u1e6Ukscs5+9YHPeszG4n7j6+cp4/5j7I6uH44ajH5lazh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yyWoMzRHyj7Qe+fS13a7G9z2cZUg+RKMhvsKT+QijXm1YQ6rH6wUhuOOT5/jJNSLmRDnjELO+8UnEhbdpJfcg5qSfLFN9YLolI3qDTbfFSAMWjwGi/CxmXt5n21tvFGshfftV7C9wUyde4eHvZ5wD0vDlNCTDbIXJGqdbAeL8QPsQ0+LxgRY7bjTIwNZG3nMpaDgUBQELQ9/EN6r7cVy1P33BQSForvfbbfy5qcOK+g9N912px1VglHTdzIh+YvvAosuZ4CSB68mJLabHKDckgecvZJCB06iUaA8IEzxqMc9gjQZx8bOEhOxzE78KzUgUZkcar7A9p1pJpddZiQ8VcScsVj X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: aabe0a11-c43f-406d-9b41-08dbaf3e7b84 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:10.0332 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 05/22] avformat/dashenc: Avoid unnecessary casts 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: 9B1+k9jDTmC9 Signed-off-by: Andreas Rheinhardt --- libavformat/dashenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 69ceae2cbf..5615430d86 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -1292,7 +1292,7 @@ static int write_manifest(AVFormatContext *s, int final) if (os->segment_type != SEGMENT_TYPE_MP4) continue; get_hls_playlist_name(playlist_file, sizeof(playlist_file), NULL, i); - ff_hls_write_audio_rendition(c->m3u8_out, (char *)audio_group, + ff_hls_write_audio_rendition(c->m3u8_out, audio_group, playlist_file, NULL, i, is_default); max_audio_bitrate = FFMAX(st->codecpar->bit_rate + os->muxer_overhead, max_audio_bitrate); @@ -1309,7 +1309,7 @@ static int write_manifest(AVFormatContext *s, int final) char codec_str[128]; AVStream *st = s->streams[i]; OutputStream *os = &c->streams[i]; - char *agroup = NULL; + const char *agroup = NULL; int stream_bitrate = os->muxer_overhead; if (os->bit_rate > 0) stream_bitrate += os->bit_rate; @@ -1323,7 +1323,7 @@ static int write_manifest(AVFormatContext *s, int final) continue; av_strlcpy(codec_str, os->codec_str, sizeof(codec_str)); if (max_audio_bitrate) { - agroup = (char *)audio_group; + agroup = audio_group; stream_bitrate += max_audio_bitrate; av_strlcat(codec_str, ",", sizeof(codec_str)); av_strlcat(codec_str, audio_codec_str, sizeof(codec_str)); From patchwork Thu Sep 7 01:05:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43613 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297055pzh; Wed, 6 Sep 2023 18:05:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjGmXrKvCZI7O2SmqPGmoKxByxkc88Yxu8+/2+xbLtt/0fO5AEmBwe5aYq8kSzbp9iTxnS X-Received: by 2002:a2e:3518:0:b0:2bc:c1d9:6848 with SMTP id z24-20020a2e3518000000b002bcc1d96848mr3137502ljz.44.1694048733721; Wed, 06 Sep 2023 18:05: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 n13-20020a170906840d00b00992ad2f72fesi10037598ejx.537.2023.09.06.18.05.33; Wed, 06 Sep 2023 18:05: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=gG1cwgLN; 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 8163768C835; Thu, 7 Sep 2023 04:05:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2058.outbound.protection.outlook.com [40.92.59.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 930F468C6F8 for ; Thu, 7 Sep 2023 04:05:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ihwu5BknbsRJ+BOClN8ozlny22co1hQ7YUA0lZtdL3vWd36clv3xlxhxtLr4fls7hzyFav2y2/5h6L8tc7abiTimet43dm3GTIkSKtuhUAjsVCxP9p+gVwpcZu9spGM7F+nS6rg07DsbBfzUR8GUg+9O5a4cjIMZEJR2CTJmIOlNEDW0WVdc33ldkgDg2GMshB4aoSRJW5Sy9mM7ZN+6ycy3LY1Q1xl/uOOLH0rglyBCZgTkrXfiOJf5LueGpBlET6FC0ceShQyp7YlAojEPSgNioNDuICZ4UYIodjP3hlz1kZkpLImNDYO6o8bEuOuGRYp2R06ehsWZhf5Ydkybrw== 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=f2sPHvYn/gKloS/SukdNgov0K28m/eBlzEqiRvGJmgQ=; b=KLQ+5k3A5vPk04qbIZcPDOPY1YqRvZYnR0S82g4I1QQ+R26ZhsKuqehLwghsz+R0JFF545VnRchs8ZD6NfmoIKIWcxMHN7QBRp9MT7oWNmFEoT35x8dYnMeIhBOIG32p3a71lj6q+cgpVf5MhjGqAX176BCmNS+jDwOrwWzYNRTgkzww7q+jXYJolNfSZQJBaYr1gi94/3xZE8+IV40QBXI7OjpCIcc1Z16D1mI8jkbT9OcPecsyWZYpp6RcOJa5DMxKpwfKtVpKQ8OIyfpluQfIo1vHv+XPuynNrZaWlIa4Pv5m8H6tSwrduOoxebZuLluUbwLXGtwAq2FmjZYqxg== 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=f2sPHvYn/gKloS/SukdNgov0K28m/eBlzEqiRvGJmgQ=; b=gG1cwgLNR3iBf4QktsACEr5+tde5zKfSgUXOKFY7fZjJ6m2OfvB03XE5N+NxzvH2hJu+Q/MvNwA5rlbZWwrOFY9T6o7mlPRBlNzjlA4VHT654TyQrqdurhW1IrcHBEzRilRjUir/3+rLyJQF9TqvFtiyKhb+XyEJVrDccQ8yDRAs/WX6iFFrFSZLlPLxshtopcAnb0HZJ/JrBzZu+dktbGCA0l7kqsEv72bPQ6JRgMJjRDUk6PvPQMUM7/xFrfHJXEy3VP04BKrD2DXO8NfprnJQIvbj2h7ycU/4cbiLpur51wk8eFkBDvwr6tG91ZwoDXFEtQVPLZ+YN+whVC2XoQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:14 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:14 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:22 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [uTjQPUDKgtHxs+N4drHirblKjX0vnNDE] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: fbeb4316-d937-4dfa-c186-08dbaf3e7df2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kcMpkz71V55dpBaBk0DlgEV6XRYZGqDJBF0wPrCLbamTQeifdXvUvDs4cDGiZR32Tl91UQNdRX9uLQeyJ2ByhRG2Mtl5GBcumsjGzG5kTKiCZY3Iz9gUaCpOrx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nU8+Gnx1YCTfA4rxRtn1vjMLJBqkM6/ZuHYWyaqNRmRg/EIRZa1gZicKBZyzITJF1yZKzMuuAY1pjLCB5Eb6Htssu+7pRSWOzF/cGQw1E7LLTbnOwp/dRlWCGGgIn59lNPl+8lOd3BSP2fJulJPE87t8xbho4RAfknErtGGGm6V/TzQa/x0EiQ4bxtB41v38+BUijpywrnmnT8QptlZw6Eh+og8v8NXCZm3PT7HkChC6m2pJHEWR6jCU74jYAdaA6DdkcjsoyfqM86s7eCI7wGiZ2ZZI3oR86s2E9Gymq/Cm7Xwt3/55bo0LgMpgnSSZrkfLtSO88hq+mR7VHOY1AfShUGHtW4IoTIWFNS4l/wj/ojCqwmnpIqXoLwJdNBe35Qak8pc9K3+iXLcy4skFzQQaNaUr3p/xi3TN7EhWXjQO4d8Z4ZAY3KA4VMn/mbSd4dLprWEV5J1xEaafK3f1LJfNXOH8FaoeamqG6M+aGWzk3kWPBOg1spwAn9f94LBHsAs4jBOCJmvSgjHULwmhKz7YXWqBRgo2lthG1R9IKdAgy8bPDDjDUK6KarIREao2bA6iub+wyWCfD6TBrjCjEWVnBLEoLdNwZcpcjXTsbH2vlcNorlGM3EfrLNfTif/wOJ/yn9pv67DP8fueXY1G80RLJALSJHGHDwNHunu6X9nvh6NYfQSlNbmcMW2tB8lJMe67+F6usreM3WhZ8+7OmO1YIVtrWZAZPqHP68r6ECSCPeBgaSlYrfm7uRdani X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fbeb4316-d937-4dfa-c186-08dbaf3e7df2 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:14.1468 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 06/22] avformat/dashenc: Use proper type for AVCodecIDs 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: YGcoED81AOdt Signed-off-by: Andreas Rheinhardt --- libavformat/dashenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 5615430d86..1fac35a909 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -206,7 +206,7 @@ typedef struct DASHContext { } DASHContext; static struct codec_string { - int id; + enum AVCodecID id; const char *str; } codecs[] = { { AV_CODEC_ID_VP8, "vp8" }, @@ -214,7 +214,7 @@ static struct codec_string { { AV_CODEC_ID_VORBIS, "vorbis" }, { AV_CODEC_ID_OPUS, "opus" }, { AV_CODEC_ID_FLAC, "flac" }, - { 0, NULL } + { AV_CODEC_ID_NONE, NULL } }; static struct format_string { @@ -360,7 +360,7 @@ static void set_codec_str(AVFormatContext *s, AVCodecParameters *par, int i; // common Webm codecs are not part of RFC 6381 - for (i = 0; codecs[i].id; i++) + for (i = 0; codecs[i].id != AV_CODEC_ID_NONE; i++) if (codecs[i].id == par->codec_id) { if (codecs[i].id == AV_CODEC_ID_VP9) { set_vp9_codec_str(s, par, frame_rate, str, size); From patchwork Thu Sep 7 01:05:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43615 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297176pzh; Wed, 6 Sep 2023 18:05:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9AQJ+CbIRhFmS4Mno6ogANUvvXpywXjPN2m0U/etxFp91FFUOXOjuVaYExT0h5rtcxkJ7 X-Received: by 2002:a19:5044:0:b0:500:a396:b2e4 with SMTP id z4-20020a195044000000b00500a396b2e4mr3372037lfj.58.1694048743778; Wed, 06 Sep 2023 18:05:43 -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 r10-20020aa7da0a000000b0052239041251si10166392eds.553.2023.09.06.18.05.43; Wed, 06 Sep 2023 18:05:43 -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=UK0ERlP+; 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 7282268C7AF; Thu, 7 Sep 2023 04:05:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2058.outbound.protection.outlook.com [40.92.59.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4FB168C843 for ; Thu, 7 Sep 2023 04:05:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F/kHqbHPm6dyvrBBONc+7JYUu2hZeECEoW4jCtDC5kcYq+bp4QO2RMEWScl0uyZjGHWO5T5oiv3FcDYWaNiVTDKduf5rvKphSCn+s1HQf+AyY29DOxUaLWG0mrGEXe9qHlHUzA1OjdGEeciEpNU0bTU3UfNCtSLtdiIslGmQbGLpeY5VNUO7eAXGE2Kvx3yv/EKGBi69lq2bZJOQVJAnc2TqnIi4IOv3ZPlYCPie3aDZpOZC+XRKEeMPTlqgKabeGnQJlTXQYLPNc4bjRSV5UOrfzsNC7XsWnXmlV7Wr3SZDSzS6X4HeGFhqL3Egsen0WfkB0RA79nQbZOCV7xYDNQ== 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=QWY3bcAYyMuaiZPYpMIfUuk4TVJwE8eO6bzK1m8IEq4=; b=nrs9qnSjjrI8nph6jNFOit39ROeclyB+ENnnWaV0rnvVc7z3BYOOxdV4aFHWfOdbx+T3M0cfVs1pyxFSPK2H4kDlIZtr9240Z2JsiSrcCyrPkV33zbCuSik2dIv+uikAVGnV9U1gOw8BmuyQSaRlbK1WRxDqJYYJnOgyhSRVMOwA07d9lA72YZP5Rn1PrlRjRm0lnugNJWprDFLWhNv+mm11xM6QNGPAcLM9U+zL+6Iq3EYVXgn6cMP1ikZ4ZWuMz6gg6q4Cte0Ge2a5KfslXK14gXSVFogCzJVSCAUX0N1Z0jyorDp4wFCyl4v3FgXSlWSmJSMcqDHAfkO7B95XCA== 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=QWY3bcAYyMuaiZPYpMIfUuk4TVJwE8eO6bzK1m8IEq4=; b=UK0ERlP+PfiAxLlZRcQglCG4ylK4JABozQ9u4i5APM4LNlYUvk9DcHomB1hnprlrTMGBYwN2UcLpCTusNg1XNlNU5FASLdoi7M5q0QfKQrDzAq+DW37r983LBqbHQKqzPYOCC6YDAqf+TFF97zdwMnMHJfET87OcUujTarQ7X5hDFlgDBvtwAVvyq8crbf1xdW0O+lGAX58UKp3TdWmIVnAdY/8xfRU0INHjhLlV2FkimhsxJdVWviPjhrUvN6sGjfBfAjkO2vKjQPwDCnZF+gVK7YT72qVzqJWBPSrMDoB15nA2mA1Q3MLiLgql6CBRDuIR+QjP6uF/Z42th6TyyA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:15 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:23 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [yA81cQI31I75CcIPMf6p2YYSpJHKJQCZ] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b44e13f-74bb-4864-6eb5-08dbaf3e7eef X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2s025CfI6piy+u7L2Xu7L/upxGjKq/EQnblyCP9Bos2uY+ROaK8CKUwRk12WCp4gj6H1GMAd584xJXLA18otvwt8rjoyj1N4zXjAVgsXvguUlV7DYMGkWDhEiY+VzOvUlBTVedPiMPEwQAFgkRgAoDFLxFlkt2lffijRy85GkRFcylZesgUVvfPV9DGG351D5FUsbGRE2qb2e7fvpWW9FNUeco26U3dEiZ5Pd9/8Vae2+w2rguQ2sD1lO09OvHoXDjUF7vcEhhnVYcRkxJ1/x4zz6r/g7KzoDHp1VkQWF3ObcTDC8FOiySL2Uz9iYItrCkJ44ahrQxccmoi7AbGHFn7MBZF9+mZCNgSOoHaeR7IXr0V3Jpq+4DyD5UjZgBP4KmX0NT9yjy/XYz8fd66GIOZ+Q5rFLE40P6iQg5o0NZd3bnsJm96ZJvCyWyTzxygR2OkieQAzPrTQmfN1c2ulytcNmuDw4CvM/RKkoBFUJjlA/ekNqkF8bcNmZnQyr/R6Q10ruPYhtxooDuWvikCPb86VgqhHD2p++I43RpjwBwJJva1nIceMAFx9hNeas2+20UZWDeaOEENO+7YCCeshfgTcd6veJPJiJBnHTRdomxXJPxwJbifrBn72ltuNWTVC X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fwbAb4xt69TZr5Ms4ghgEXB/7g8Mb2xV3XWWNbCX+M/ycZlBf6yoCtGjVAslGaYDqJovSj/ooEvXsxGhue/W/Qn6DUp3x3saKoRZqdyI354RyitplncA0Ax8VPTeZVQ8PYfckjxtVsKFWP0S6H1atlf8Mo8HTXy86PFoLaBFqA1ss0x2ElH/eNrTHS3EdCm6245Z8pGNw7/E6z8aSB3VzkEDWXAo2mhbzgjr5Vjk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Exchange-CrossTenant-Network-Message-Id: 1b44e13f-74bb-4864-6eb5-08dbaf3e7eef X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:15.7916 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 07/22] avformat/dashenc: Add const where appropriate 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: 4tQSjXdXqSGM Signed-off-by: Andreas Rheinhardt --- libavformat/dashenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 1fac35a909..9c3ba2c389 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -205,7 +205,7 @@ typedef struct DASHContext { int64_t update_period; } DASHContext; -static struct codec_string { +static const struct codec_string { enum AVCodecID id; const char *str; } codecs[] = { @@ -217,7 +217,7 @@ static struct codec_string { { AV_CODEC_ID_NONE, NULL } }; -static struct format_string { +static const struct format_string { SegmentType segment_type; const char *str; } formats[] = { From patchwork Thu Sep 7 01:05:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43616 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297245pzh; Wed, 6 Sep 2023 18:05:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMo8JNli/dkgD5+PhbnPNvF2GuTw/Ru/8e+4sYDo/Gz7IrNFty3T/YKGHTCTGQS/TCeUvY X-Received: by 2002:a17:907:2cd9:b0:9a2:b89:f82b with SMTP id hg25-20020a1709072cd900b009a20b89f82bmr3579802ejc.1.1694048752751; Wed, 06 Sep 2023 18:05:52 -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 b9-20020a1709062b4900b0099d9822f67csi9954971ejg.1047.2023.09.06.18.05.52; Wed, 06 Sep 2023 18:05:52 -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=GX3fCUWD; 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 5FEB368C87F; Thu, 7 Sep 2023 04:05:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2058.outbound.protection.outlook.com [40.92.59.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D6B6E68C83C for ; Thu, 7 Sep 2023 04:05:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mdeGGWFIsbRuzUaTHSa5gwuv3oVTD0v5dR3RoQneH2Nto3RK7MzxozfyZx81M2aFMJ2VUIAzyG3Gkb1NBuyn+vP8CxppgnHh4l72bCU5NtiNNoEnTzW56505p1wy/tOIEIOwSFGcXDugTw9fZvWV1ojvZmN9fMmVFtuuhC5Wl8yQX7AD5/ATpsgRQVFylnNtX0pp3rjr83BT9IdA6o0wqZEhmYxr4II/RQIv2IIQ8eGlPJfpB5aR8tRC/GJ6jQsmbekLyuWuYIRkfLjq/l391GN8CSpmjFS3hjA3A/NG7PFVQVqC/4Z9n3GN2NUlz1oOV31ibCOIeuO9i0qUP5Zr1w== 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=OzjKE17KXgfZVYjHXksRs+lFap1RtUj193zuzaE5XeM=; b=iU23j3xmFnf79Y4n8+AfIFBtnlBNTx2ifwF3tQ8dhuczeZlmCnAIPi/sB3fCraV/m1kJ5JcOAzwL9pOuWNPLemdBgtNzMHO8IXB8NNeX5CUlls8KjrlXoONKGbgcI4wSAjoio8v3SddDpU0HBnhyTdUbOexJAJYl3430t+5qh3QFludKrFFmViicN+MxAt8iZaJ2PBNzvaf3hX5ae6cO8iFowLCfavsGJbLBQqYe4dPkqor4HdxtN0A5YXnO+QOcKGY5061BoEo0Mt9AaUd9KwP7NrfL8fagaEQvOe/TcU7RwZ/zPUodvV2drgLRDqHsCzfaTvhbWp28rfbn+zSf1A== 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=OzjKE17KXgfZVYjHXksRs+lFap1RtUj193zuzaE5XeM=; b=GX3fCUWDSBnL2zLLc2VBX1K+4c/iz3SuT3n/BAQ4P+JyE8Bd1fdaba4YBHtH5JPB3bOBUzMKfdynGbB5zBMCJGnhih8h0hrznOHK4akiWQzehr1KKckjw150XbB5FoqMGqH1/wHqYiL5sUEyAsf8yNk/STEMOqFk3ZIac4rwFkdC4uuYwDCYjGUsIUoU/Bz6sPzSbq6GCsIMTbDA90fKTLhbBTxGhYY7epqTvMLf4o7FOzR5ro/V/+rmZ0GREyh0vqRO6uRWCCDDKYwzUe0Yqiz+79z0+mbxOhes6GKRG9bQJi8bwqU+H/rIoemNeTFbefw/TT4c6hftQ8SBLQuR6g== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:17 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:17 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:24 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [ayAu7lBzjI/aLPbCMEtl7LAChwVS6Xtq] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: ce1db3ac-70b8-41a6-5924-08dbaf3e7fe7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oROIHfGn2eNRUoGjGsJKUq+T9rAES2bRtkgdN+tdtDVLH2jl4nILOJqcARMC9hKx0pOGujLELsO8O5mQIubcaHPLPA8plqYPiurLrzwPzTLoOwd8bw0J5PcPkmXGcZL9WMrUnK0DuGCg49k1+SWx+zanGYGee/ScDRAv8jiPwG7je0LwAVQ25yTy4slLSnAJYgHiCNs8OROf5dnK6w1FhnEW+In0U/OD2j1s0NGIDTozq2y3bnc2kHyUKK3Z3yWEbRLvpZNQiApFDYQXOkLstP+Zsb3LBKEFKKu+5z5zznVZnn6nAkisQYvC6RWkI2Vczfhd2HqmUYBU3LeazvWQ/KK/YnEm8R3mpksgHIovsUptEa56ylFdAnltdJSGWUJ5RD1qMBTbmJ4LLccmXNKFSQ2F+p7L+S5G1g5LEG7cIrsySezuhvuRLge1mPCeB5qsnPN7DkL1+DjrJINhpEfyUIywa8MxnLOjbHhp1tygkWvMaQp45gctgaay4TH5UOvfpsKXlaq0wmg3UKAhGK46r40kn0TkQiUniFaJ0THnpKc2769k/uk1s+1n8MiKSOh9RbeBb98V1WeFRHWS07OBso/6RZ5jGirM6GyJgGFTjPHDb+5lqfnhDI6KFHrkKne7 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FRkGpNJDL5X88QC9gc1OBhk/6DiwRY0Ck3/adOVmNfMLbmOTy6ul907x+uN+e3krYy7Y3kK4hITuaLHlyOedm2R05ywgEQgf74HwuzVunuRtyt0t3gqXSY8hef3AHq1XBo7CFLQnowMKRaQYZUNNihhsa0hzqwthGSCAod2rfYdlRs1o7/JN6IpRwWk1NgRoUPeNfeUiaZN8uqT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orOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce1db3ac-70b8-41a6-5924-08dbaf3e7fe7 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:17.3873 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 08/22] avformat/dashenc: Simplify getting format string 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: zeij9lMSmc2I A switch is simpler than a lookup over a table with three entries, only two of which can happen at all. Signed-off-by: Andreas Rheinhardt --- libavformat/dashenc.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 9c3ba2c389..e98d54a61d 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -217,16 +217,6 @@ static const struct codec_string { { AV_CODEC_ID_NONE, NULL } }; -static const struct format_string { - SegmentType segment_type; - const char *str; -} formats[] = { - { SEGMENT_TYPE_AUTO, "auto" }, - { SEGMENT_TYPE_MP4, "mp4" }, - { SEGMENT_TYPE_WEBM, "webm" }, - { 0, NULL } -}; - static int dashenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename, AVDictionary **options) { DASHContext *c = s->priv_data; @@ -265,11 +255,12 @@ static void dashenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filenam } } -static const char *get_format_str(SegmentType segment_type) { - int i; - for (i = 0; i < SEGMENT_TYPE_NB; i++) - if (formats[i].segment_type == segment_type) - return formats[i].str; +static const char *get_format_str(SegmentType segment_type) +{ + switch (segment_type) { + case SEGMENT_TYPE_MP4: return "mp4"; + case SEGMENT_TYPE_WEBM: return "webm"; + } return NULL; } From patchwork Thu Sep 7 01:05:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43617 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297348pzh; Wed, 6 Sep 2023 18:06:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBAMtFyP+kWMY5Jdx6y97ohpA0SLsTzGOh1STUY2lrqiSvytIRiUT0qiqdkeQ0Ymg+MDOQ X-Received: by 2002:a17:907:2e19:b0:9a5:7e64:5c55 with SMTP id ig25-20020a1709072e1900b009a57e645c55mr3491988ejc.22.1694048762271; Wed, 06 Sep 2023 18:06: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 k3-20020a1709061c0300b00993d5cdf483si9967718ejg.807.2023.09.06.18.06.01; Wed, 06 Sep 2023 18:06: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=Nhb2b5dA; 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 79E4468C6F8; Thu, 7 Sep 2023 04:05:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2055.outbound.protection.outlook.com [40.92.59.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6173368C7E7 for ; Thu, 7 Sep 2023 04:05:25 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H01jXgloKKnNfPT3ufWrsIQOC1Nro5wvUPXY/Y63ES8n/Pgg0bUFlhHMBYvxBMxU+Zy8fEZw7qwvkkEoxv1NBq3S3XFIaroI4sdMSW/DWDlxO4DWe/Mhz0zXlKJ9kPa0mYnGIO0WVjjMJlQSpfFkM0i5xPB8T75IN2kAQTihK4rD0CaBP4UGgAMmPXxVZEOB+Kt2DUTzbawnEj/E+hj0GINIQ8IJk2L3fbS6a/ZTLM/k0ZSB4T4BUwxeAVD44IvEUlcEIpgIeI3WUBBbMY9Uz/C0NgbZmN9sc4m3nEFAIdWINUFT36QoaEC1ZhDJofVxgl0SrUpwI6299MxHyK1pyg== 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=tBwcVpRb+FNE/4UsBgqGqCZds6j2XCtl/OzDwCch9R0=; b=fy2XPFW70pMwFxHrAJ3SeUYq21RZd5G0ONoS3At0ehTGjEW2Z9CYok8w7L/DQ5eucg+JFT1/HLjKQA4WsY6V2A8iWpuqd0/6kRDsBFotZN2ThWrvDZU2+WM1OTIDZMWn2e50aw0uVMDn93ZxyJUG3nQImhcPfqnujWbQTm2nPUnyAOQyf0A+sSfGkxPil3HZXBS2oVWuKZ64zKrNkhKrhMc42orvDS1q7xGZ1VjnNET/G2o3sUPicUye7FnZWsBIEpeJt73mv8M7cs89IQjaFYacDdBH01ILIwNkc/ndw6UTORCjs89OATd09n2sxih1atxQnjpHqx1Ty21FgB67ww== 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=tBwcVpRb+FNE/4UsBgqGqCZds6j2XCtl/OzDwCch9R0=; b=Nhb2b5dAnsRjDdhCqP8AroaJKy9KPW6H35sYLEFZTyY/uXxR9mkN7H38ftpToFLG3kUe6XcU6sJflKZjZEXoMFfdaSIHo+0qjNQDMHc/DpLBi686uRXOdCDVjgTP8G/dAC7uAvjB0vLIBuSD7Pd/YTLiBykOH8tmnFBndLrSTA2FSeb7REx/5aSnp4M47tLQePj6dfeToK2N2vm6dZNtNb/XaD9bxhzudJqO9pTYQIKep2uRkM/S0a7gWhWVdNgu8Uw6kayN7L+jAuOGssrxQPqn0ryFTiyE7itNxLW30CxIJRv3rlzXG8S8X8kTJEADg3GycVQ3EG3Cuq8YIOiopg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:23 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:25 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [QnFnbytnF6z66OTp0zpadJ/OyIr26Bfl] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: c5e282e9-ffc4-42cd-87c6-08dbaf3e83b1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Aow5JL3LWhNqsOlzwCrsIEGizA72uGHxBp/TZov8vgM4kDc+n0gbl03yRdr0ebmK5Fgh+cWSm0X3prgfCL6iMNqtWbovj4p/6hlbP9lmwppn22NOQJZx/nolKrZtVu81l2RQLYiY3osnb27bSowVbic+fQWj6t/pssaFSrWY04Oag2VIp7CyZeROGqSoQBQOCmWM3+HoR63RJN1wMBD5LeA6SiVxR1ny5O7y0uXYIM2lhFiNqKwIJOrzYnuL3zati1i+CYg7bu64dNTHOoWeVSLZ6QyB52wpAPQ28m/X7/INpPFBhuOHsa7EfMaarLKL2sudkP9EJlQECl2aEdCPcjkS3MEi6ck4NVxDvzHGRr7jqhJ1G1Yt2q7XWVPUSoaNh+pK6vmkO0AoHrfudzqwMpUaHfkx3NddobEc3lPXXYnmcqvPLjLPdlbw1U9C8sUgscj3Vt2PlO1G+ziIUjEA1v5trgF7iWA60mTblLXejtJY33BKEm5wAr2PtMaO7JztmxfXpjN7UqrFxpgDOFv4gDNmGUT2x9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bvJJs/RnX8pU0xDnlO/CCJ5DSYxx8E204nCurrD/YNwH8rWirSOYwyOZsTX6DoqFVTYG5wwTFu4wiwU/iO3djNj1pumv5MS41ZxAO2syOuag+YFX+KwyoqHcZpl6Lt6MFQZpD4kw9Y85u3B9vaveFnWldbh8+xD/OXbmWwF0fV6t+Eu5N2nwfZ7szN9JKfaFG2V9pcHpaZafMH+icNuBOuf88+EzPhagBQqwJ6a7xbtEVr61imMWV933vvxqfsmepwWx8PhaJb3GuupVYcVq5CGCbAHJePAgxQK8WTJLJVBbgaWPIOBIUNlUIoH/O363gsBDyx3/O8Zvwbu2O8PdjWKSHkIr1vnVnjD2 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5e282e9-ffc4-42cd-87c6-08dbaf3e83b1 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:23.7971 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 09/22] avformat/dashenc: Avoid relocations for short strings 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: 9s4rJesU+gzU Signed-off-by: Andreas Rheinhardt --- libavformat/dashenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index e98d54a61d..96f4a5fbdf 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -207,14 +207,14 @@ typedef struct DASHContext { static const struct codec_string { enum AVCodecID id; - const char *str; + const char str[8]; } codecs[] = { { AV_CODEC_ID_VP8, "vp8" }, { AV_CODEC_ID_VP9, "vp9" }, { AV_CODEC_ID_VORBIS, "vorbis" }, { AV_CODEC_ID_OPUS, "opus" }, { AV_CODEC_ID_FLAC, "flac" }, - { AV_CODEC_ID_NONE, NULL } + { AV_CODEC_ID_NONE } }; static int dashenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename, From patchwork Thu Sep 7 01:05:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43618 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297413pzh; Wed, 6 Sep 2023 18:06:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDriF/qU9Q/7skT4+9LB4u8Ofpe3xEdh3UOKFHftXxB7TMqZYIALDzFhUIt991zRoJkdau X-Received: by 2002:a17:906:70d6:b0:9a5:ebe4:de6c with SMTP id g22-20020a17090670d600b009a5ebe4de6cmr3722853ejk.55.1694048771450; Wed, 06 Sep 2023 18:06: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 rh28-20020a17090720fc00b0099d977a31fdsi10725845ejb.899.2023.09.06.18.06.11; Wed, 06 Sep 2023 18:06: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=AOVpDza5; 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 6EEA568C884; Thu, 7 Sep 2023 04:05:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2086.outbound.protection.outlook.com [40.92.59.86]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CAAD568C889 for ; Thu, 7 Sep 2023 04:05:27 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hxwlVJGQTYL6EnleRWa5pBfYdxyn6AlaV7UuM9Ac/mmy1KXBTLity3V/a4GbfPxQ6E9ldNhGGNSxsIgz1GDfY78cagfYdkZSev/k1QRJ7sNDM5DdA2HAklld8hM+lxLX0v6S/16vBH7WfL56MaG7L+MxPJoc5KZULicVIph69Atqe22aXcHMAWois3Jr6fG9t6DbpnnDzgvqPxRm2KmsbJXx2+DM8QtrqAwSw/+51zdK3wNJMbnIvUc+VEYcb2DQ2A9DgOi0PDDj4xDGw8sme8ibgQcRKKiCKGjVMcL7EjrVGe3fXTz3vQ5ZFPWnmWkU9L7ziYpQvBQ1vGLD3FsuQQ== 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=zbT6s+tRmfJLrVT0J8xSimQa8M/kj1iJX57e5KtMuO4=; b=PVJ2ukWg00CpLbLzwgJ6S++tcbWQPVQjDQ/o6VYmw4JklBOUOM7R6tBBnsSWW+NJhDg6IBzhXo7oYwS8ZWe2rL2SW1f3MDmBrmG5lf+Xs821qiWxVoHE6odb7KmpGiLIgrScCH1sP/BtaWhC5FAZgz7fOdj2l8vDtaH0gnTFWF+OJaYQmY33FY0KByAKhPNPb/BNwq6im4LiEioyTkPyVvIFNNzkgFpKihGCIEkpT8Ta9/sBGGc73Z/nfbFVyUTL+sOZ5FMZmdB4MgDkxbjaBN2bW/+6vr4S2h9ZG7WGrRn3o8aZuqPJzRAzANAoeP9IL5y6huSDo5usvHk0RkLhBg== 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=zbT6s+tRmfJLrVT0J8xSimQa8M/kj1iJX57e5KtMuO4=; b=AOVpDza5ve9soH2sEb/SyxV2x/Klq/UitQ7SgZT3oqmnKkflxIU5PrEu8mggV1pIldGlEE2LD2FUTC0KYaathLbVCxxnu+USOJIL68XdA7Y3BVgr/1x2FcVa9UdwV4iuYIchWThsr2Ny/d2soeSAWsGPCeXgmvRFgJPS/Qnq4L+I+ipSiiDKDNIQTZ5TNcziu9Ejw6XhWTUUWYiEnB0Xksk+tOi2kFBzr3i+5S+s0FGT3rHTi8yiIaPEjFd2i++/+psnfdD72TZjLRa+m8wTP/dph0yVqdp55XV/PLwRpxhJrdKT3HZQasMoLB2q1CT5oaOr0VK/c7pX25B3osYKRg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:26 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:26 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:26 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [SyZm7bCk64KJ13gVUdB7pGAnEaN+JJnf] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: d27b3b38-df46-4145-3f57-08dbaf3e84ff X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4/0A/DhjWOrI4B/uhQfJfRbmkuheqBst7v5rHhOOt4H020/NFYkbOEFzGyuS7/OBEiuQOvUmDdBawYjgovRRftdDvHR1i0dzf7sCMi+xt87oTSjo0mW/ZnqtiDTvC7d3GMcJXGiyA0djW0s+DI7M2qoLCpXSZefxExYR3my6+yGC8ZcQfIRdkzC+qlzWirFZCYOy8Ncx0XgLHIVrO/OnIgAXoRoGeF9G/jSa4tXwXs7rPLibtO7WEI2vOV2uDmnU3PDwvrbkhGOP31Q2OpxdRdwdyRPjfQu1yo0HGCv6Hx3zIyxs/fpJK4FfP2YS1c78gaCM2iowYJ14nRp/YxkS9Hin1JsTR9sLdfcsloi8lZgAqJeoy2cMCJ2PiPw7JvDUJeHsGDDBBzlS5ssfMzt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FkEdGny4nygAJ3aXhMPZaqUInGVzqyZm3vFBCc9PV/t5pviJjngq8WmIWX8IyIBUcJD69QoSGucu8A5OFhxa/EdXq43jcXGz4w2Bu7IqRBmxv7V6oz1BK0uGfoDzLE808ZRHOP/0AyCCxbXCmR2BzORFtMtg0ChjPZQciyERmgvvdCFD2yhqMmx+/8LD9miprMiV0WHmyzsI0ES2qAW28INJyYyXr30MGioyLiBlitAZzyF5+KH79nasLyL7eJQCRA+NVnKcGpfOYBQqC2Chw5Zrfm4Z3Fzr/MIWOgIqBVEsHrMXZmBnnNQGpk1YVaRWzQi5uZ/NDH1zl7TeVtaSLAPxPpCjhVkj3dXl4ktuKvUFI2Rnp8JpuXiw+mv3OLUbVQQOjBWCHe/M5uOoaaHz+/4kzW3O8e9dvbATyzWublM7i0XXKDVpET2hR7DqCnNJP98kwBzETg0252Aat5XevwkV261vtgyWPV1Fu3NK6RoCVm X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d27b3b38-df46-4145-3f57-08dbaf3e84ff X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:25.9816 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 10/22] avformat/teeproto: Remove useless AVClass without options 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: 4VcubYzKrYsf Signed-off-by: Andreas Rheinhardt --- libavformat/teeproto.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/libavformat/teeproto.c b/libavformat/teeproto.c index dca97a6741..7dd5065f4b 100644 --- a/libavformat/teeproto.c +++ b/libavformat/teeproto.c @@ -20,7 +20,6 @@ */ #include "libavutil/avstring.h" -#include "libavutil/opt.h" #include "avformat.h" #include "avio_internal.h" #include "tee_common.h" @@ -30,22 +29,10 @@ typedef struct ChildContext { } ChildContext; typedef struct TeeContext { - const AVClass *class; int child_count; ChildContext *child; } TeeContext; -static const AVOption tee_options[] = { - { NULL } -}; - -static const AVClass tee_class = { - .class_name = "tee", - .item_name = av_default_item_name, - .option = tee_options, - .version = LIBAVUTIL_VERSION_INT, -}; - static const char *const child_delim = "|"; static int tee_write(URLContext *h, const unsigned char *buf, int size) @@ -154,6 +141,5 @@ const URLProtocol ff_tee_protocol = { .url_write = tee_write, .url_close = tee_close, .priv_data_size = sizeof(TeeContext), - .priv_data_class = &tee_class, .default_whitelist = "crypto,file,http,https,httpproxy,rtmp,tcp,tls" }; From patchwork Thu Sep 7 01:05:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43619 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297506pzh; Wed, 6 Sep 2023 18:06:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMcftHnnztO6ZrBOrRK0akCZ9IbgJF9h7vbrAXO7GhaFTA9TzfQcXeToqyv1qUzaKuhCXS X-Received: by 2002:a17:906:8a4e:b0:9a2:143e:a070 with SMTP id gx14-20020a1709068a4e00b009a2143ea070mr1576900ejc.20.1694048781181; Wed, 06 Sep 2023 18:06: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 l11-20020a170906938b00b0099bd2075268si9964761ejx.920.2023.09.06.18.06.20; Wed, 06 Sep 2023 18:06: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=Qcu0aels; 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 7A6CD68C894; Thu, 7 Sep 2023 04:05:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2015.outbound.protection.outlook.com [40.92.59.15]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 631CA68C84F for ; Thu, 7 Sep 2023 04:05:29 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kJN5vKWtvVSWYBbGHDy6TNT0yVa8A5inSVwxPJKE65o5PdCnr8xKta/SMdTdqaDcmAc5psK2lwSC2x7Bx4lZC3ttfppNlghiUlH6d0tMOl5PEohsVgcdnUfXUfoe0QGed/D8FWf6btjUUkRDX9WBJbuy61nhP/EIg1gmuU537g3Ezu7vdP0eLP29T+QDaPFRFx5gjHT45WDWLh8Vx9g/UaxJWnAxoPNnioIKJS4IV7YdPWjz6I+jCXSdDX+5K1gjtNLZSp9mD3dZdz0HKDa3SSRHjDuASub6JYVDHwV6/fw5mhBzeXNijGby6gEoY3YbiRh0Lc5Bg1sKwmsV3doGjA== 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=cJc1cQaIpQGQ+b+/49LufPe6Lq1oQZ5fJQyVmqidf3I=; b=jrGrllfElzMRm8NeHFV8qTYO7Z5hhz5HsyDMYlzfi4boADLBf27DkYylHkKSFJ+a1SJmHxVc4liSoKC9JOpat817C0ybS1oYDQxxHtDSrbHeruQ62J2xsxFRkJyBNpOzHstMCNQIJ8zehuPOuoX1n52ZRmFymtvQCB5aAu26S0RVNOnIawOYlb6Xig5vamvrA/hO+kbH7oh7gRmWHcpz9HqWLpPqyjCkzygOSiv+yJDPwvmaokZ1sBQWveyZYIA7b8KjllWeyX73E55c198g6kH0Az+GcU0HwTwpL95yj04A7qGpHOSe4SPP88aukGGQoM4AmfhXRhx09OmZM+QAIA== 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=cJc1cQaIpQGQ+b+/49LufPe6Lq1oQZ5fJQyVmqidf3I=; b=Qcu0aelsHSzgWpCWzY3I28qHiax7wYci/OQczdt/U9DuOx2uTa3ixv+sYrAef44HVVqVcqsz0864FwEDyZBSizANooOeOg7Qa43F9NxiXm2OjXtA3hSs1V0rqG4N62R72DvnaTl3v/8VnMoJcMRx9DrbO5BklMRrJ+koQ1/hdm0XQ925IXc2PUicnGBITeExAEcyEXh4/2YzRZqL+n56iGm1fLJEsnkwyCNEqDnc6eTm66PJ9AgAZYY9ufvLf6vyHabbqjU9EXF4FrRaf2P3gOwpAEXnaIlPW6jkmrXhQx2nz6o2xanhKUZ8XFtR7zBlZ68MlxbOScbtBuycPcUHWA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:27 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:27 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:27 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Wd1TEF31UaVihI6HZLO1l/SANhIsufw8] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 59115538-1d9f-4f68-eb9e-08dbaf3e861a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C5swveUZxdfBUQ/dFrU1Tv9TnTpB6P7ElFcml51nMviR83ZHIKmwc64TQrqpOufZgEWKGqmvVyY12R+HxaALbHZc07gc5N0GIrvfPreXh3hs1sgtRhHMwHPeNIOdAZsaRqNDoFrqek/az0O9ZLeOCKXxx+4yzDvl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ji4x6I8S4jyQko46mTPi/pRFIIkLJWfx+8MOGNcGep6LbsglXJT+zW0pATsiEkCLO+KX8DaIDyrdzY2rxqad+LPNcr5Z9jX8htuWfZ2jcVRsc2kHlRJsz+vp0oydDkkjgZhMoNNM7NerGpCl8AQSnHCF0krQhtPVq3IYBkRQpahd2p7PJwLW2oLLsJ26C4kBZK4hXi3HyKlXM/rF+1lfeaSWRpTEp7DZT6SVt9hqgD2KEMNaRsCFV+/WTkn3EOHDJtx949j+QrotcIGkzXOaDWuk+MwtC1omftnB3VjynOs+18TvHRdWA1u3+HM9eNFd1VmMHjklk6gKh8oE+4Qarp3tSAUNYCCU0FCd473uEWCvDn1HDIQmJR3gndviNoBP0ky6BLshu1lR19w5aeGlg4hIY6nS68N2aK0DWO27hlO8zoWewDSvoUzsLWGQ1P/vQNpr/f8Q/F54fto6n5YmhbVptvIWIux8H032pSN7zcr7a4J/VOMNGMe6Yki8BLuIEWG0nsmz7p9B08do2cLpmqTA3sTplOf5Ghr5x64tchZmbUCTLeEtEmk7JSRF5rWVq7lBuRhoWgTyWtAWT2pb00p+tn8JNg1EN6T8yFKW0q/Zup/kdZuJskNHjpzNOk+c43WdGTV9odmdL6XRtY1ZImvzncXgKtAqNO7c3SuBHnTtTj42rgz0APFgWVqSZjSY/XB3xiEOIWFd/ro/20pb1wBr6lo+IsOnKga2BUx X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59115538-1d9f-4f68-eb9e-08dbaf3e861a X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:27.8829 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 11/22] avdevice/lavfi: Remove unnecessary avio_internal.h inclusion 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: NKk7bdj4Y1J+ The stuff declared in said header is actually unusable in libavdevice. Signed-off-by: Andreas Rheinhardt --- libavdevice/lavfi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index b2cec0400b..ec7ebdbc90 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -39,7 +39,6 @@ #include "libavutil/pixdesc.h" #include "libavfilter/avfilter.h" #include "libavfilter/buffersink.h" -#include "libavformat/avio_internal.h" #include "libavformat/internal.h" #include "avdevice.h" From patchwork Thu Sep 7 01:05:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43620 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297590pzh; Wed, 6 Sep 2023 18:06:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIsJO+2YiELHbeNQr7ZOCoal7BWTjSF1Dh7BE/z95jmFcftWjSlZUKVEB+M0oXDLxyrkRn X-Received: by 2002:aa7:c990:0:b0:523:2847:fb5a with SMTP id c16-20020aa7c990000000b005232847fb5amr2966359edt.40.1694048790805; Wed, 06 Sep 2023 18:06: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 c16-20020aa7c750000000b00529fae6ac14si10148802eds.158.2023.09.06.18.06.30; Wed, 06 Sep 2023 18:06: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="PM/KWB4N"; 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 9452868C897; Thu, 7 Sep 2023 04:05:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2042.outbound.protection.outlook.com [40.92.59.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D624368C7FD for ; Thu, 7 Sep 2023 04:05:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MQ+sK8WWPoMrwcDjSqy7l9+BFDOpfbo7LBh2MQ0k/0NeXv7YY7uFKqILMQ03kD4qSeNx464XNWmiXCAJpgaTEaZWLuKTNoXz31+x/h3fwmORfDf0d8cXGufs9r16FX6ocexesxHfh6C82y3luARysf52gTjxAPuNw+ugIbNGs1ryfih3JFvA3vU47ejqagADOVvm4Xadads8vZIf6m0CrbxaUmRNNV4FG4YQi9nGGOO6WuZFSv+pAb7fQYtFA1gHxvAvQ1Mn2D9R+NhL7SE6q8FPrhxQFTV7Gl3KYudmW3pK9rM9pCdpzAzbU+0pnXjdeCeG6skNgkktu8T9Mip1HA== 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=BjoMzrurbD3QTMWP/8jzBQ0vzV1WD44LVIfmmej0xQY=; b=f4uPHYBkv1sF5vAAki5mBfX+8pGKC51eLDoM27BQfgvK4KKpHL0Sf9TKIbO2YygyYwIxuntnVlaMyPSzs6Or+29EnTurTcDj47e8/wPBXEpWc8stMcvK7eewOWJXNUgy+2NkDSzYifw2tooMVw7VJaEhzaNQODog1iX/3qGocD714/NAebpWfQ9Hf6U9OZuWurFPZISlaZLd4qGO8L4RCRxbawKZEUIbJ7QkCXr6i7VpuLaQ+RvQn4D48EUW9X0Db5RuIhdVnPrtnUOF6l7UvrIXLF6anjhxIYMIGrzU/CZTBjAu9j7Aof8sfhzpXGqAGYzsnzbNOMRYh+4andLw4Q== 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=BjoMzrurbD3QTMWP/8jzBQ0vzV1WD44LVIfmmej0xQY=; b=PM/KWB4NejhDYucmTzA18tP2wL1UaVJKX3OGCtfzgkapJBlcQyls3a5iOqpSHKxVJuUhOLlsS7OMKIqED1u8iABRlAnpjJdMXEpo544lrmqXWdtGospuDt0G+VlHnmRtpIkwseDgV/dwv9fbl9O3X261wr6/VtipK/vMJ4FNawlxiTc4nQdV0L9VLX4TKlSPDlq+V3D3IsMR/wSNWRFOmg460slWxxiAqRHxl1VekkSGumjl5JXHtgxnqqmqkqi0QbYeIOca+jZnu9b+DQAb8BUewz0n9ifrkY72MGetgJiHjyGb/vqa6EWApP4QNDGX2AnNIWDLEQ6o99Wh5NkIMA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:37 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:37 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:28 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [xhVSlh9SFY25KzFKnlFcCUXiZAP5KOEQ] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 295b4ee6-3547-416a-db30-08dbaf3e8bc1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S3gOhfRBKgV2JgH5au7wlgljYZ+oQ6C5//7M1p34N7M/yXIEKd9z7QOO46S0GCXbycNfmkkBs0WG9vsLgVRe4b6myUNZBmkjD75bgyk7Q673XT02mDaGLbre0Hxqfj9sqENN3VfAnWn0uKQoHvoomdNNI1j5rFfSF6VA8Q9lqAGnw9+X6oYtnq3D4Dkn9JjImB+SY3bH7v4BFMkJ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nEMSTvTCxLJfl+fI2+pZ+J41B+I0vx+yD7m7da6uXOSt/Aj2Y5M4wPwDiHh2VS2pnKMGZyGx6DXXx45UEZuw+r1T7pIqz1aHAW/q3n8L2DyxWhGJXGX5ASdyBLQgoLnfX0XSYW+BbEe/3I4asSIfxVBm62whE25wPJVV4FjvArMhobrVTVuwa0nIRzPWka5bkcikCmvJlIY61WIa03TMqKHjF5cRXCZ4IQ+WER446pe/XGsbnzYOneMepK3Ee8sOVCAPQ6AFwo977yeJ7xRf5X5u6eQ5EinsmAdfSq9nAckjKj8qPvkVifBNsF3jTRq11GGQqQ/WrrYdki99lWTxOBrouIDZyAe0OweSy1Cyn4ir+qXjVwl4fpCOaBkQB5BDR64+BWn9Vz2iXJrrNJFHs3w7LJE2WbXf1Fk3YSNpRsq9LLMwUMQRpa99VFYrN9ttuWdL+M6yYYX4QIx6P1l42sMmW0t9GNIcRBmGh6L043jxx3Bc2zsGFqZv66GUB6uSAk1s6NCM/hia9U5+IH3owyAbn0QpJodCmn4OgvjBwiUvhC18uzzJ+CbXVopzQMBwAmSB4/kXqTaYsUGUcSw3bqFVCtPU9EuCqcH6/spLJc2U+b0MxeG6CjDLY2qhT3sliF+sp+ir5bjXyQnflxEwGCS0qcN4oLYCr5czJgt9ZNseS3 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 295b4ee6-3547-416a-db30-08dbaf3e8bc1 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:37.3025 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 12/22] avformat: Remove avformat and avio headers from protocols 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: 26UZIEniGBZP Signed-off-by: Andreas Rheinhardt --- libavformat/avio.c | 1 - libavformat/bluray.c | 1 - libavformat/concat.c | 4 +++- libavformat/crypto.c | 2 -- libavformat/hlsproto.c | 1 - libavformat/httpauth.c | 1 - libavformat/libsmbclient.c | 2 -- libavformat/md5proto.c | 1 - libavformat/rtpproto.c | 1 - libavformat/srtpproto.c | 2 -- libavformat/subfile.c | 1 - libavformat/teeproto.c | 9 +++++++-- libavformat/udp.c | 2 -- libavformat/url.c | 6 ++++-- 14 files changed, 14 insertions(+), 20 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index fd40f9ce43..5e1acba31b 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -25,7 +25,6 @@ #include "libavutil/time.h" #include "libavutil/avassert.h" #include "os_support.h" -#include "avformat.h" #include "internal.h" #if CONFIG_NETWORK #include "network.h" diff --git a/libavformat/bluray.c b/libavformat/bluray.c index 635c4f1b87..1845551c34 100644 --- a/libavformat/bluray.c +++ b/libavformat/bluray.c @@ -23,7 +23,6 @@ #include #include "libavutil/avstring.h" -#include "libavformat/avformat.h" #include "libavformat/url.h" #include "libavutil/opt.h" diff --git a/libavformat/concat.c b/libavformat/concat.c index 825e43a7fa..e1d57de557 100644 --- a/libavformat/concat.c +++ b/libavformat/concat.c @@ -21,13 +21,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "config_components.h" #include "libavutil/avstring.h" #include "libavutil/bprint.h" +#include "libavutil/error.h" #include "libavutil/mem.h" -#include "avformat.h" #include "avio_internal.h" #include "url.h" diff --git a/libavformat/crypto.c b/libavformat/crypto.c index 1d4514e0f2..75b00020bc 100644 --- a/libavformat/crypto.c +++ b/libavformat/crypto.c @@ -19,11 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "avformat.h" #include "libavutil/aes.h" #include "libavutil/avstring.h" #include "libavutil/opt.h" -#include "internal.h" #include "url.h" // encourage reads of 4096 bytes - 1 block is always retained. diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c index 6a2765bbe9..4db61dee30 100644 --- a/libavformat/hlsproto.c +++ b/libavformat/hlsproto.c @@ -27,7 +27,6 @@ #include "libavutil/avstring.h" #include "libavutil/time.h" -#include "avformat.h" #include "avio_internal.h" #include "internal.h" #include "url.h" diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index 0a98ff80a5..9780928357 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -26,7 +26,6 @@ #include "libavutil/random_seed.h" #include "libavutil/md5.h" #include "urldecode.h" -#include "avformat.h" static void handle_basic_params(HTTPAuthState *state, const char *key, int key_len, char **dest, int *dest_len) diff --git a/libavformat/libsmbclient.c b/libavformat/libsmbclient.c index 3285868957..f81fff2dfc 100644 --- a/libavformat/libsmbclient.c +++ b/libavformat/libsmbclient.c @@ -21,8 +21,6 @@ #include #include "libavutil/avstring.h" #include "libavutil/opt.h" -#include "avformat.h" -#include "internal.h" #include "url.h" typedef struct { diff --git a/libavformat/md5proto.c b/libavformat/md5proto.c index 14cefe719c..653bf10e66 100644 --- a/libavformat/md5proto.c +++ b/libavformat/md5proto.c @@ -23,7 +23,6 @@ #include "libavutil/md5.h" #include "libavutil/mem.h" #include "libavutil/error.h" -#include "avformat.h" #include "avio.h" #include "internal.h" #include "url.h" diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index b970901d01..cac361047a 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -28,7 +28,6 @@ #include "libavutil/avstring.h" #include "libavutil/opt.h" #include "avformat.h" -#include "avio_internal.h" #include "rtp.h" #include "rtpproto.h" #include "url.h" diff --git a/libavformat/srtpproto.c b/libavformat/srtpproto.c index 13e2245015..61669e05ad 100644 --- a/libavformat/srtpproto.c +++ b/libavformat/srtpproto.c @@ -21,10 +21,8 @@ #include "libavutil/opt.h" #include "avformat.h" -#include "avio_internal.h" #include "url.h" -#include "internal.h" #include "rtpdec.h" #include "srtp.h" diff --git a/libavformat/subfile.c b/libavformat/subfile.c index 2936c79e06..633a9e3c62 100644 --- a/libavformat/subfile.c +++ b/libavformat/subfile.c @@ -20,7 +20,6 @@ #include "libavutil/avstring.h" #include "libavutil/opt.h" -#include "avformat.h" #include "url.h" typedef struct SubfileContext { diff --git a/libavformat/teeproto.c b/libavformat/teeproto.c index 7dd5065f4b..33877ed808 100644 --- a/libavformat/teeproto.c +++ b/libavformat/teeproto.c @@ -19,10 +19,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "libavutil/avstring.h" -#include "avformat.h" -#include "avio_internal.h" +#include "libavutil/dict.h" +#include "libavutil/error.h" +#include "libavutil/mem.h" +#include "avio.h" #include "tee_common.h" +#include "url.h" typedef struct ChildContext { URLContext *url_context; diff --git a/libavformat/udp.c b/libavformat/udp.c index 909213a467..d9514f5026 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -28,12 +28,10 @@ #define _BSD_SOURCE /* Needed for using struct ip_mreq with recent glibc */ #include "avformat.h" -#include "avio_internal.h" #include "libavutil/avassert.h" #include "libavutil/parseutils.h" #include "libavutil/fifo.h" #include "libavutil/intreadwrite.h" -#include "libavutil/avstring.h" #include "libavutil/opt.h" #include "libavutil/log.h" #include "libavutil/time.h" diff --git a/libavformat/url.c b/libavformat/url.c index f53fdf59d8..d5dd6a4666 100644 --- a/libavformat/url.c +++ b/libavformat/url.c @@ -19,16 +19,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include -#include "avformat.h" -#include "internal.h" #include "config.h" +#include "avio.h" #include "url.h" #if CONFIG_NETWORK #include "network.h" #endif #include "libavutil/avassert.h" #include "libavutil/avstring.h" +#include "libavutil/error.h" +#include "libavutil/mem.h" /** * @file From patchwork Thu Sep 7 01:05:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43621 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297663pzh; Wed, 6 Sep 2023 18:06:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMONZBgqhG9YY3WGbs5tjOqGQ0eod8iq08C8JcEZ+axKCd0M+HAjacrTK0CAFGEMmR8pWU X-Received: by 2002:a17:906:5396:b0:993:d75b:63ea with SMTP id g22-20020a170906539600b00993d75b63eamr3512456ejo.16.1694048800396; Wed, 06 Sep 2023 18:06: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 p26-20020a170906b21a00b009889b296070si9347126ejz.261.2023.09.06.18.06.39; Wed, 06 Sep 2023 18:06: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=V7D6BCDB; 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 A645768C896; Thu, 7 Sep 2023 04:05:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2103.outbound.protection.outlook.com [40.92.59.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 103AB68C80B for ; Thu, 7 Sep 2023 04:05:55 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c8J5KBG1G4dYwn1ZY0Jo1WTi0pcqV6m/wUSxJPAjH0thyh6qD1+SDw4CdQTqHktTd59o7TpeYD0BLlrORYyYjEBtueEXhrskrrmPXh0gW/RaYLKezcPQXD89QZQHgtqR67G4iwFBZ7v/5wesr4QxBCkj9BV8jllz3f9RT2GMISC6KMBxweO3jbCIk0royOk/KmtH1M8/A/sZLR3DyQG/qbBkWkPw9YsFRmG04Dr2kQ7y+f91XocKw/k+Koxzb/LOXU32LIYCzkFp/gx3d7QzbUlqTl6TBUNGn1Uo3macO30f5e7UdBNLz0SqDXQH8Azu03HIj4g2h7zKHKKbrvneag== 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=ctjCya/87Jx/Oeg+ZW3BqmRrw6O18MmURwBka1vU9ns=; b=eMYQ5ql2WISZvQz2y4tJvZthwwBZklfpfVq9VevyyNIuPuMH1r0zTVToZ5C7StjKtHc+Od7eIvWbTNYKroHfhkeHKJxSj8sszMUpU+IiiD2ReZOekYFjbMxS/1RmEFdhJaup9EUxRCdMV9ppxZ7g/bt4vLKG2Y96+OhiUohzZ/N2Pnp2/WPRWyphHti0Ot2E4INp7o14U9tJZl/Tj0b7HdSUVrbX3NK1z3Bw96ZNdORu2Ogell2B5u4fw+yWrKmDeMtqDVTVSeecS1gQXPTitG89dlQfIrb5taW2pifGABUIQlYg78MAvdSX5yiIcOURErgzDBXzkp9Haz1n8TEkYg== 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=ctjCya/87Jx/Oeg+ZW3BqmRrw6O18MmURwBka1vU9ns=; b=V7D6BCDBBrY/HLHcteSkBtk667jBMil/6vhxyQOgY4sdKdjhUDF5FWf4YWiJSBsFPIqLWTHh7nh+Chy2srIdkxzPQ4T4hDvpgosMbBBtRcaIFyW2Cy0MpeiVfChSQlYoVdC7zNOBw2y5QKn8iz29TtputSI9DmPbjJkbtCUkza/PIa+dvob0tnKpmF9FvR0bDi2gY875R03SlaQdxmPb332ZPbRNNUK36D/mUCsAcbrXJKqrFr/GDJakQhr3Mlxl+Fck8yiyKmtRsP2VHi086+5TWJb5sgRPQOZVV/KyosFrh8I9tBpTIxqosM2fCHrXjGMVn9hlW43/83KbhXaHew== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:53 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:53 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:29 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [QV3qonYMk/A7h+SBktx5CKg4vOGtYC+v] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-12-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f937c5c-ba40-45cd-09e2-08dbaf3e9546 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dtE0j4QucuFdZ0gWDXpphQujIEiPPS70jRwAGV3b6+k3scdQiEXrpqSljYyuS47mdAmHPmy1B1O7so84e9gqgUnuC7mAv7lk7ACi2CkDs657eSDIDoM2czNMw8X6z1Rj4XlEoxzBVKnam0+N9MOomxzLsfPQ8PiTAe4rXn49Nsrd6p2S9go9l1Vl9Xr4VWDr2tts3IcjMJ8BhKWgYYYq7Qhb7ftzAZNmWMuUpyYJfg7h3g6+0UFGcjJXPK4kGjHVNqRTKkSZL4FJHkIKd8EBmnrknZGvu6zBOWiUVb5XIUAySETdCGxq+xc0zNNXLSgnNV6SqMw4t1c6Jc72u8JzL7rUwadzJ3mx9W9IY7tFNU5bVMe/Sv7yfBwoyLo9E8cI3KZWS8IKUdItwXyvyTIBJd7bKo2p5Scg2oA3O72+ojgbTPeAlOmkc7t05VFBrxQ+MEucc7PpWCXt4jQBi6C0L46KUjz6z2Um/1uVFBFjqCUvPGdsGfpLn8tiQcuJpu0eRWDJxVB9aM1sWVByStVvhYkcJcy3bLVRg3ndseEvgGc9nLgPipcftRKXGzIv7SCSlohxQJm11FuZmo5iiJnoOoxllGXrM/wFpN1MvU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J799ZR9GBgrOvJEP+xEOXq8kRwa0nPX/2ZWtlOOa19RPIlo0z8UpIigxBSP9bGpeLSUK+0aBVBQtBC8eQOBHtRVf6qDdHj75hRenS44OGX7ZnyABcOHdGafHv6MD7h8od39KypXzDG69lJr4kqx2n9tYdawoOHeOUEtA0aIVQW8sHZGxDCAOekIQ/Ytcfhi9KTBv77HSTv8gnX8AiQnyUaglKXlC2pc9o8JhxaWUWeDY3YpQK8LQIUcFDjdU40HYUIFJqr2z1RXew3cYx0Snn1Fu+v+knnO X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f937c5c-ba40-45cd-09e2-08dbaf3e9546 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:53.2845 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 13/22] avformat/teeproto: Remove always-false check 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: LsprUajgII1x Incompatibility of the flags and the protocol's capabilities are checked generically (see url_alloc_for_protocol()). Signed-off-by: Andreas Rheinhardt --- libavformat/teeproto.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavformat/teeproto.c b/libavformat/teeproto.c index 33877ed808..5a74e0f113 100644 --- a/libavformat/teeproto.c +++ b/libavformat/teeproto.c @@ -25,7 +25,6 @@ #include "libavutil/dict.h" #include "libavutil/error.h" #include "libavutil/mem.h" -#include "avio.h" #include "tee_common.h" #include "url.h" @@ -78,9 +77,6 @@ static int tee_open(URLContext *h, const char *filename, int flags) av_strstart(filename, "tee:", &filename); - if (flags & AVIO_FLAG_READ) - return AVERROR(ENOSYS); - while (*filename) { char *child_string = av_get_token(&filename, child_delim); char *child_name = NULL; From patchwork Thu Sep 7 01:05:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43609 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297707pzh; Wed, 6 Sep 2023 18:06:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRdlqUCKB0Cnbm7paBWqaSKRUdpLwZ0s958KCfoKeiAmZWhCUHrIYwCfoxuI/fP1mYAUII X-Received: by 2002:a05:6402:8cc:b0:51e:4439:f474 with SMTP id d12-20020a05640208cc00b0051e4439f474mr3346026edz.35.1694048808606; Wed, 06 Sep 2023 18:06:48 -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 d26-20020a50fb1a000000b005233d7f4910si10139932edq.162.2023.09.06.18.06.48; Wed, 06 Sep 2023 18:06:48 -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=MIneaQJc; 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 C84F868C843; Thu, 7 Sep 2023 04:05:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2054.outbound.protection.outlook.com [40.92.59.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 51E8D68C831 for ; Thu, 7 Sep 2023 04:05:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UwHlxANc531pfAO9bF2vfm4VXZQrlt59AcTG/+Cg2VK1GH/szM/3QHswaiB56121I0xKXF9zktdSLcVXXIfIbd8Xhcy6vwWHiPX5qp2bdHoWeLoSXCv5KX78R2zXeh+QKP9AzwUfNAUMBDf3OyJWYyzVShOVV4CNQ2AkNHTevUy0CfYR3u+QD7YNhxNYvjlbCElM4wJwTDM+InoBLkL5J62REuNIUX3DA5bUic1W+EUrdO9BEpFUwEga2fzh/Ccu1X4jNwN+aJBzmEZ0tuBp+eBbt5xr75qtWew0QxWfN6W61WJ2vFf7eQoinNqIkym+PImiLTrCBiMta/MnFgFqoA== 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=mqhUqpkBpo9C01oiPNYANFzrOqvba+mDW7Z6zuQpbsU=; b=YZ6PL2KRCnsbEkBNrKUhBHxuNV0wPquHPzrtCDD1is8VsuLkfl7qzZqANVLax0kDnVCXrVSJKqkO2m0/vwW0J4s70+D72DSw32XG2ZRK5V+7YqKA2QE33e4Xphp5wLPpBAmts1jUomtK45Pe8pAt4IkZtRrND+KVXarvhtmtWT/eheTe+9XU2z/9zIc0QUfOij9loGKq6N092LOMwEGi7tVcTQobbecbUCZPl8yJSdXprWiSHIbXwgRqtzNloD7VbjX8jgb+7CSgVo57SwoL4XdsmfhX19UvCm2/j9L7OKNCBGKDUgva/k74XFkOJPku4xCGizFov5OMKDWjZGEaEQ== 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=mqhUqpkBpo9C01oiPNYANFzrOqvba+mDW7Z6zuQpbsU=; b=MIneaQJc+NAUmCPUREXLKCthHIU2heBk/gGNmCQzXI9iF9rmE+rv8tgF7THLvrc8zosWA2pz1AcAOmf/u/XtKb49mdUPc01bSIClwfIj7L/ZVuY8reYxBmT54hd2mgaBxnprZj/GKKDpEoY7K8gHfJc6peD6V1aEOKhftP+T3FRJLQrWmoyRymHn5VptsKGbMBdxzgALLKVZiMmFHgPPfs7ViJb0zfmyNPdHLJe4Qbbri5ZsAubeh9siFbxGykOeE8u8Cu7yTwO7V8JhG7SOIv20x4u+wvXfbRtwmj4Sgcv5QiY1nxIV7eX+dKxlR+6DYjkInLr21F21E4tHu5u5pA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:55 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:30 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [pQuhztN/iNgB56HYGlgyZ/7sjNlh+SBK] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-13-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a4a48ea-d30b-43f3-d456-08dbaf3e96a6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Itd55yD373NkUzal3A4CNWWlIcjKYeSkFEO78BRKx7LZlqmdAb5l3BSPkdHYo+9VYIBEu9WRBkcRHy1c90kDoWlCwVbOamKk2YYrw3ghVVezLaCj/wXkdvpF8Aq1sDvApV/czxm16QLq9Hp3sueUS5/4TvW6s6wisjFlwKOo0wx+JMVvgH1QmYLbQy7D3JTaY1uhMQbpamETw/HZ7B+v987Uo3Hr5ANrn43cK2wlPfvEUCQB9w2l09ZFIOqucdPeSKtptojfCcGzf2Z++D3n1gTbqJrRnWsgSyTxKKaK5Qgyo23506Lr+6sHj0OofFXV3xobqDgt+MkL7um10DHJJq3idZkr2/apJHcJ+FaZSawW03H/B8ziXq4Yqjc7JsmJxmg8zX+6CSNOk66VGjrs3l4sq4ITMlZWWYlGDpPGOeUFcF+8ueXRqt+2I1VMocwCPlJS7OYAfjH/WEnSZ8tVKodMTnyviEzTU45okwoZJqBUpDwofhV1OdGAyIEOmYpTHEEm15YzLVgGwoAEkng7uT6niV6EtjbxCox9UUrORPsq6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eAsXQEEYuiT3N3gourjvTxeP3VDUSYoH84FYXMKkX6J3aoHzo/1GDjDJeOMxdXhr8yneUGTOUVObIUkeDDKA37Kz/zZrHjkKpI/K2ck9MU1NoxstCLgcmpDDZvsMuYAvDPkSZOz1bisPz8PtDrUW30GVQn+y9kzt4bwV/zUrwGlanV0VwHN+5cUFJAwjxBrsNpS3EKzw/J0ui+qExtok/CzYMPjfmEhcY3Bgx8oUv5KKY4xeeyqXl7VkY625jdIrApj+O4fLeb2JjT05vdptWQgN8eV1xBa2r6n0VEKtrmNp9lJM2wgegtKLbpsyQFr/44ueEBlqSRxhsb0WYaq X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a4a48ea-d30b-43f3-d456-08dbaf3e96a6 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:55.5607 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 14/22] avformat/avio_internal: Don't include url.h 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: TTwtKpqGo0er It is only included because two very rarely used functions use pointers to URLContexts; use struct URLContext instead. Also move ffio_geturlcontext() so that one can avoid a forward declaration of struct URLContext (which would be necessary as soon as FF_API_AVIODIRCONTEXT is no more). Signed-off-by: Andreas Rheinhardt --- libavformat/avio_internal.h | 19 +++++++++---------- libavformat/dashdec.c | 1 + libavformat/format.c | 1 + libavformat/hls.c | 1 + libavformat/hlsenc.c | 1 + libavformat/rtpenc_chain.c | 1 + 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h index 57796ade03..aef6ab660e 100644 --- a/libavformat/avio_internal.h +++ b/libavformat/avio_internal.h @@ -20,7 +20,6 @@ #define AVFORMAT_AVIO_INTERNAL_H #include "avio.h" -#include "url.h" #include "libavutil/log.h" @@ -194,6 +193,14 @@ unsigned long ff_crcA001_update(unsigned long checksum, const uint8_t *buf, */ int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); +/** + * Return the URLContext associated with the AVIOContext + * + * @param s IO context + * @return pointer to URLContext or NULL. + */ +struct URLContext *ffio_geturlcontext(AVIOContext *s); + /** * Create and initialize a AVIOContext for accessing the * resource referenced by the URLContext h. @@ -205,15 +212,7 @@ int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); * @return >= 0 in case of success, a negative value corresponding to an * AVERROR code in case of failure */ -int ffio_fdopen(AVIOContext **s, URLContext *h); - -/** - * Return the URLContext associated with the AVIOContext - * - * @param s IO context - * @return pointer to URLContext or NULL. - */ -URLContext *ffio_geturlcontext(AVIOContext *s); +int ffio_fdopen(AVIOContext **s, struct URLContext *h); /** diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index f4af625814..cbe34f4f50 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -29,6 +29,7 @@ #include "avio_internal.h" #include "dash.h" #include "demux.h" +#include "url.h" #define INITIAL_BUFFER_SIZE 32768 diff --git a/libavformat/format.c b/libavformat/format.c index c91f71057a..477ad6b43b 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -30,6 +30,7 @@ #include "avformat.h" #include "id3v2.h" #include "internal.h" +#include "url.h" /** diff --git a/libavformat/hls.c b/libavformat/hls.c index 276e4ee333..b2a93d578b 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -43,6 +43,7 @@ #include "internal.h" #include "avio_internal.h" #include "id3v2.h" +#include "url.h" #include "hls_sample_encryption.h" diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 12e20580ee..08f3746ce7 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -51,6 +51,7 @@ #include "internal.h" #include "mux.h" #include "os_support.h" +#include "url.h" typedef enum { HLS_START_SEQUENCE_AS_START_NUMBER = 0, diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c index cd751f48b6..45d0e313fd 100644 --- a/libavformat/rtpenc_chain.c +++ b/libavformat/rtpenc_chain.c @@ -23,6 +23,7 @@ #include "avio_internal.h" #include "rtpenc_chain.h" #include "rtp.h" +#include "url.h" #include "libavutil/opt.h" int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, From patchwork Thu Sep 7 01:05:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43622 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297782pzh; Wed, 6 Sep 2023 18:06:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNNV0VZTaEQQV4hIcvq6Vb3I/2UBHXeus3kyyiLWdvf7FBSLZsVXSf0e7VoDOXuh59Jnze X-Received: by 2002:a17:907:774d:b0:9a1:bd53:b23 with SMTP id kx13-20020a170907774d00b009a1bd530b23mr3922615ejc.14.1694048817816; Wed, 06 Sep 2023 18:06:57 -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 y8-20020a170906914800b0099bc5e44abcsi10009875ejw.676.2023.09.06.18.06.57; Wed, 06 Sep 2023 18:06:57 -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=cNBfsdFu; 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 AD38168C89E; Thu, 7 Sep 2023 04:05:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2054.outbound.protection.outlook.com [40.92.59.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E56C68C89E for ; Thu, 7 Sep 2023 04:05:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e1AzVkXqbu/cFmLQQhVEt5x6Zwoy/YMNpkWghYnpjRk6QR90g7vBlnYE/5h5U0FctXh3Z8QalgZo5qU4Lga5klygAUTVXoQDPBthibMVsoKrTPZg7aSPO4U3IQn07XAYfecjcIdUiDYQWV/93yQN1fkmQ88+8dU603xtJD5t+tyixvE6pjT1A+ApXv+iN0NaeCE5re19ZVhXtI0v0SaL9eF5IWNsjUJ0MDbrxb8gEsA594qBZcoVAIcEkSdS2xX3yfzYVAGjsKtOwX8ACys0AZVcpA2urW5cDIhQg2Eumg1FUUcu7SkcFoLDxZExH5HVK1/vBBnrRkIgtZ5n2armWw== 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=8SwMSSJwUq6DeaK7S7ro8zuihUQBljSTII+UoHfLJMg=; b=O7lH5jXzp1cTbNjc1Y4J3nmuxyBm5FgUJsy4DwhickX5gF5JH8fG5eOcBUlNFncT3VXN+4ad4raxqRXID4PHZ0CUhZCcyd3rgsNyNODsOaTOe1t7nqfcv+/C61RQDOgeSmox7JJnuuz8dE78MDjDJoT4A8M+cumfDAfAHboyXy4t862B5Vzq6+RqQYnRNgiTXvpsJGZV7ky2xU5okduZYqzqOH1c2URid8u6lyZHw3sf0hJO4NoamyJbpnXd0v0ORTJf1daSuEViJ4f2+Cw47kzVNyBjuFKCb7SrKvdJCspjcHPWzmBAFRmbQOBgxZyyaHeLWAxMZ0Vgy0vFkhVLtA== 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=8SwMSSJwUq6DeaK7S7ro8zuihUQBljSTII+UoHfLJMg=; b=cNBfsdFuoLzR0vYiniPNeNbMBBwmqTUyXQ4pTkI+PF/bu6XrUyICesX4x4EKEWzkUn8gaYtmi9nYF8F6ka885iM5IIvwxk8xJNJQsplTI3MkMfgeXYR8fr44lM1oFujQrgRkH/eQBFkocGq9f1B+g8nKBJXxvB50kCIcerJQoPMCnKJpzvBvOzhvV1BEh8NAq5X8IOfe7GyAD2ajmqcV7EchjYJzjHh1mms5G0v9urlG7q6XGEsxIr/ZesIqvxhQEf7vv07pJkVN3+MVeMBC1uVTs05MRAi2OOZQqeRgU+qcYq68tR9La7cRyDzRKaP06QNLALztMWFKWGaz5pXvXQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:56 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:31 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [KlSV+Hinllmi3wk4AwxtpL92g+BitB/V] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-14-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: dfdaf9c4-b75e-4ba9-4ca7-08dbaf3e974b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xt4DOwqnRu2wmIdvQSHtFEW/M4yTBaIpwtTfp6zONziJiuzTcRDMu3RPRm4cWNL1BsPxeyVoCWhYB8jRU5v245Nd1iR0cUB7ystwGdGPH/oq+n7A5KIEAT48wehopfHuvRrgxh8mbxvlyquGP7XOuPz8xlAB2HLbo9crai08ZMO6c1I6LRBE9JLARJOiWM0Io26zHS+phIrF2580eo9ZucYdm4vWDJBPb0gls9xka6muq+oftc4EnjFtZmnzGRcmhxobG2aMM5LTA85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jBUVWpWUU/w9QVii6RtwenAOBSbwiljYu3z7C3iT86TnQcVizHRQUHvO7Wq80y9Gm+1K/ZjX3ajiaDgOK5KIiVwZAkK956VrMUT90U0mADjKDHFu8ITl5/Iqi9Wc9Xa0An9DO+7yx6kwEkxoh6/bpGGMH9LCoX8Pvmfl5xkUUqQV+pWvMc7GiO6dpvHi1g9O0QJ36uGgRDMbZktB8KHs+aJHuyJymA2G+YBJUuY4JwNLSKJ3FmT5N3gwrPs4AvilpPIsv7ZyjNelafwUoBdvSCBYl7VSY6kweWADwTslCMG+CPifELjQzi8MWSLvzqEsNmRHDc8/SWtGcI7DlEL/0B8ZXjG5GwsztSnY8IP2KAw69zI4y6sd/PK730BG3Y4RB50BneDxQm6Rh1OzzFnWbNx6TtLoyZ0RDVNhdmvs4VtGTSURAqyzsqrlUwT0QvapB5VaNC+TpKG2zXeEkr3gGMhCLZ99vwozL/aMBF8/gJshT0RW8vqM+JhFQlTWxhB1bPF4gRSKAMHtK6qIa7WeKm65QvGvMgJ2VthzUmg38XjxRNh9rqbvEDmhpjwZa3xGHglMsHF6H9RydqJX/CvaUXjkKAtXDKQ9EoTRyrFPr+fj1P3MuwS7 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dfdaf9c4-b75e-4ba9-4ca7-08dbaf3e974b X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:56.6372 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 15/22] avformat/avio: Constify data pointees of write callbacks 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: 6UwRf3GLsDGB They are currently non-const for reasons unknown, although avio_write() accepts a const buffer. Signed-off-by: Andreas Rheinhardt --- rtmpcrypt.c sometimes modifies the buffer whose content it is supposed to write. doc/APIchanges | 4 ++++ libavformat/avio.c | 4 ++++ libavformat/avio.h | 13 +++++++++++++ libavformat/avio_internal.h | 4 ++++ libavformat/aviobuf.c | 28 ++++++++++++++++++++++++++++ libavformat/hdsenc.c | 4 ++++ libavformat/smoothstreamingenc.c | 4 ++++ libavformat/url.h | 8 ++++++++ libavformat/version_major.h | 1 + 9 files changed, 70 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 762c2d6628..963ad477bf 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-09-07 - xxxxxxxxxx - lavf 60.xx.100 - avio.h + Constify the buffer pointees in the write_packet and write_data_type + callbacks of AVIOContext. + 2023-09-07 - xxxxxxxxxx - lavc 60.26.100 - defs.h Add AV_PROFILE_* and AV_LEVEL_* replacements in defs.h for the defines from avcodec.h. The latter are deprecated. diff --git a/libavformat/avio.c b/libavformat/avio.c index 5e1acba31b..053cb2e05a 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -421,7 +421,11 @@ int ffurl_read_complete(URLContext *h, unsigned char *buf, int size) h->prot->url_read, NULL, 1); } +#if FF_API_AVIO_WRITE_NONCONST int ffurl_write2(void *urlcontext, uint8_t *buf, int size) +#else +int ffurl_write2(void *urlcontext, const uint8_t *buf, int size) +#endif { URLContext *h = urlcontext; diff --git a/libavformat/avio.h b/libavformat/avio.h index 5f13e0622d..887a397c37 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -238,7 +238,11 @@ typedef struct AVIOContext { void *opaque; /**< A private pointer, passed to the read/write/seek/... functions. */ int (*read_packet)(void *opaque, uint8_t *buf, int buf_size); +#if FF_API_AVIO_WRITE_NONCONST int (*write_packet)(void *opaque, uint8_t *buf, int buf_size); +#else + int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size); +#endif int64_t (*seek)(void *opaque, int64_t offset, int whence); int64_t pos; /**< position in the file of the current buffer */ int eof_reached; /**< true if was unable to read due to error or eof */ @@ -286,8 +290,13 @@ typedef struct AVIOContext { /** * A callback that is used instead of write_packet. */ +#if FF_API_AVIO_WRITE_NONCONST int (*write_data_type)(void *opaque, uint8_t *buf, int buf_size, enum AVIODataMarkerType type, int64_t time); +#else + int (*write_data_type)(void *opaque, const uint8_t *buf, int buf_size, + enum AVIODataMarkerType type, int64_t time); +#endif /** * If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT, * but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly @@ -407,7 +416,11 @@ AVIOContext *avio_alloc_context( int write_flag, void *opaque, int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), +#if FF_API_AVIO_WRITE_NONCONST int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), +#else + int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size), +#endif int64_t (*seek)(void *opaque, int64_t offset, int whence)); /** diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h index aef6ab660e..bd58499b64 100644 --- a/libavformat/avio_internal.h +++ b/libavformat/avio_internal.h @@ -89,7 +89,11 @@ void ffio_init_context(FFIOContext *s, int write_flag, void *opaque, int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), +#if FF_API_AVIO_WRITE_NONCONST int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), +#else + int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size), +#endif int64_t (*seek)(void *opaque, int64_t offset, int whence)); /** diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index ad5827f216..c55fe8a837 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -84,7 +84,11 @@ void ffio_init_context(FFIOContext *ctx, int write_flag, void *opaque, int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), +#if FF_API_AVIO_WRITE_NONCONST int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), +#else + int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size), +#endif int64_t (*seek)(void *opaque, int64_t offset, int whence)) { AVIOContext *const s = &ctx->pub; @@ -143,7 +147,11 @@ AVIOContext *avio_alloc_context( int write_flag, void *opaque, int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), +#if FF_API_AVIO_WRITE_NONCONST int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), +#else + int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size), +#endif int64_t (*seek)(void *opaque, int64_t offset, int whence)) { FFIOContext *s = av_malloc(sizeof(*s)); @@ -165,12 +173,20 @@ static void writeout(AVIOContext *s, const uint8_t *data, int len) if (!s->error) { int ret = 0; if (s->write_data_type) +#if FF_API_AVIO_WRITE_NONCONST ret = s->write_data_type(s->opaque, (uint8_t *)data, +#else + ret = s->write_data_type(s->opaque, data, +#endif len, ctx->current_type, ctx->last_time); else if (s->write_packet) +#if FF_API_AVIO_WRITE_NONCONST ret = s->write_packet(s->opaque, (uint8_t *)data, len); +#else + ret = s->write_packet(s->opaque, data, len); +#endif if (ret < 0) { s->error = ret; } else { @@ -1396,7 +1412,11 @@ typedef struct DynBuffer { uint8_t io_buffer[1]; } DynBuffer; +#if FF_API_AVIO_WRITE_NONCONST static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size) +#else +static int dyn_buf_write(void *opaque, const uint8_t *buf, int buf_size) +#endif { DynBuffer *d = opaque; unsigned new_size; @@ -1428,7 +1448,11 @@ static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size) return buf_size; } +#if FF_API_AVIO_WRITE_NONCONST static int dyn_packet_buf_write(void *opaque, uint8_t *buf, int buf_size) +#else +static int dyn_packet_buf_write(void *opaque, const uint8_t *buf, int buf_size) +#endif { unsigned char buf1[4]; int ret; @@ -1565,7 +1589,11 @@ void ffio_free_dyn_buf(AVIOContext **s) avio_context_free(s); } +#if FF_API_AVIO_WRITE_NONCONST static int null_buf_write(void *opaque, uint8_t *buf, int buf_size) +#else +static int null_buf_write(void *opaque, const uint8_t *buf, int buf_size) +#endif { DynBuffer *d = opaque; diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index 080a873ee8..7062441b70 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -112,7 +112,11 @@ static int parse_header(OutputStream *os, const uint8_t *buf, int buf_size) return 0; } +#if FF_API_AVIO_WRITE_NONCONST static int hds_write(void *opaque, uint8_t *buf, int buf_size) +#else +static int hds_write(void *opaque, const uint8_t *buf, int buf_size) +#endif { OutputStream *os = opaque; if (os->out) { diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index 3c050ca54e..0379e9a079 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -75,7 +75,11 @@ typedef struct SmoothStreamingContext { int nb_fragments; } SmoothStreamingContext; +#if FF_API_AVIO_WRITE_NONCONST static int ism_write(void *opaque, uint8_t *buf, int buf_size) +#else +static int ism_write(void *opaque, const uint8_t *buf, int buf_size) +#endif { OutputStream *os = opaque; if (os->out) diff --git a/libavformat/url.h b/libavformat/url.h index bba1a9a1df..f0327218d4 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -194,7 +194,11 @@ static inline int ffurl_read(URLContext *h, uint8_t *buf, int size) */ int ffurl_read_complete(URLContext *h, unsigned char *buf, int size); +#if FF_API_AVIO_WRITE_NONCONST int ffurl_write2(void *urlcontext, uint8_t *buf, int size); +#else +int ffurl_write2(void *urlcontext, const uint8_t *buf, int size); +#endif /** * Write size bytes from buf to the resource accessed by h. * @@ -203,7 +207,11 @@ int ffurl_write2(void *urlcontext, uint8_t *buf, int size); */ static inline int ffurl_write(URLContext *h, const uint8_t *buf, int size) { +#if FF_API_AVIO_WRITE_NONCONST return ffurl_write2(h, (uint8_t*)buf, size); +#else + return ffurl_write2(h, buf, size); +#endif } int64_t ffurl_seek2(void *urlcontext, int64_t pos, int whence); diff --git a/libavformat/version_major.h b/libavformat/version_major.h index 293fbd3397..1b43fe64cb 100644 --- a/libavformat/version_major.h +++ b/libavformat/version_major.h @@ -45,6 +45,7 @@ #define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 61) #define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 61) #define FF_API_AVFORMAT_IO_CLOSE (LIBAVFORMAT_VERSION_MAJOR < 61) +#define FF_API_AVIO_WRITE_NONCONST (LIBAVFORMAT_VERSION_MAJOR < 61) #define FF_API_R_FRAME_RATE 1 From patchwork Thu Sep 7 01:05:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43623 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297845pzh; Wed, 6 Sep 2023 18:07:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGjDvyaI4qI61eX2W/9qa7KZ0l8fOJZv7b1o769d40L+9J6YJJTUGCKJW8LPgmHTn3zs5A X-Received: by 2002:aa7:da49:0:b0:522:40dd:74f3 with SMTP id w9-20020aa7da49000000b0052240dd74f3mr3395996eds.39.1694048826933; Wed, 06 Sep 2023 18:07:06 -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 w7-20020a056402128700b0052a1d5122dasi9926578edv.331.2023.09.06.18.07.06; Wed, 06 Sep 2023 18:07:06 -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=dFmQSwH+; 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 9761268C85B; Thu, 7 Sep 2023 04:06:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2089.outbound.protection.outlook.com [40.92.89.89]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A3AD368C85B for ; Thu, 7 Sep 2023 04:06:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P0bHoNWePAIvHB9rXki1db1KpeYIatizAlbhHWCQz0rD1AEGY6q+5uruO4Db6Rs0nbu1ecgyLlyDt6eEiK7FLFyyqxxVZTo9oP2h/AjL5pw3xKQE8e4/D5treFaHyf2r+O/JPbvNDt33wbV6iZUEgpns7xET0X9xhZt3+LOvCXiFuVkEuZxE7Zfs5CDOIfw75+5n93JXMilybTOXA4LMdMQDTj1PPFCTxrpMlwK/hRLrrJZLHkcfQvLHwYN5EnTA9WIvMKkfLBVParuvE082a9NZdbgr/efa9mpTr3mWJBjqoF8qbvpvsEDVThdSeTzf5xi/h9xAfyC/Z4FsjB39Jg== 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=CIxcnUGfUiSPlduaxJKynJ3marYhLlbhVCE6s3l9nJU=; b=Po9v4qB2LbNz5ahEiqv79mOCliUc1ckJkxqMv2fJxn4D1nCcOGiUI280Dso1Xh/N/0vKa0gnGBCZm63VtduPzsaN+bPV0R7k7Claf7LQTsnuLtEqalM9RTwL9gAPsGZAv1hGuMM8apE0s/gt7mL9Wzedf4LrvVE13n9mPX6YicaKWJfBoVAhQBu2ziTAVNMhLAq5DlE+WNjvxcwSPQquf+5yDjzSErypTzg0fQaA/3v9Y/QGkV35CZ2Aqtl8RbcSGPTgrk9IGf5gxQC6t3FDoGuEIyOtS5aJsD0P2RJAfUox7c1yHPa1bLeWrDmyEtnWLHWpkHlkDX8QTnEzXl81Cw== 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=CIxcnUGfUiSPlduaxJKynJ3marYhLlbhVCE6s3l9nJU=; b=dFmQSwH+sSJwLb3Bs/6/p6/y/Zg/s8/QLWAlO2lcqKOlZZ4LD2IeOnwxH0Q1ZRQ8Vi5KchTBqOzor1r5bhzmhJdnpU5QMiQsmI04WXlJdDJhbZml14uyR08uE2/SPizZzFbxVUFS0o2/TkbTA6+CQhlyFs1G6Cbe6UPuCKSMsJqwolBNUVzzBjT3JnQcmTgbp/jP9KfAGOxEwd1JEAh33iC25QpIPxW6EUrHnvBjFdrZ7A8Z/wm0uRluU/dPwbaxCzO4UAlNuq5VTxxWL8/F8OiMiFxrraI0NJDjeKR7LgW1BLC90HlZhY+HjzauLSVqrCsDhF8PD8V29s+RoRR9Rw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:06:01 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:06:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:32 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [j21s/wDJ2I8h7aqwdBX3z2pXs1yqBZLm] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-15-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c7a59ea-3518-4b7d-da4a-08dbaf3e9a69 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZCtxN/eRHhiWjcuctkCfpny5ZY5NJI2lWWKEi6+t5x1gwm0Z7xg52yFeFhq1NJ2vOfr37HHgXs2+JAydIXo+gvALAr4NukzAV9C+ZfG1D7Wf5flRX7RLAMa6a8hJJYAFlLkDdbMgiWCyDQEEuxjl9EFSMLHfY34SFyobTtam6+JBQpPnGuj2dzb1ZeP/hd/VfWPc1DXD1k2mxbHOo+VubXHHG9joj9RGtaW6HG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u+naibZp4MR6hae5+ULhTUpvvbQJWlSvbMf59Q/VnOJzIaoeL04q5oSwSOIZtFl6k2K97OUV4ejDk4n4vP4efwr80s3neAlnoIoyaoNfWN4SEviDHqW2bNDEkmvYBwKODnuCdE7d59biOrvoG2si97Rnr6Qqnepf60MMUKV9tZoDSeYuh7+SHFqsNoby49NTK9A90vvMXv2vXwATEiIarQjKrlh8vt4DLMikrl8m00gXWGPaXbYG7dvGloqoysClqM23GESjQNhvyiHdrHNVDzK+WmPosdkomAW0x4FshzJT4XObqG3JMK/Wqli6sncur5dws3VxHqtk1mC4dvmprpBLYNVEMhMA93ge0/iCtGeo0RTX395VQqmOUxNNWgb8xumnbeXkOahRv/0QEAOY/pxPmKW8QM7F3TDxZ9+5suVsl43tGa60IWsSYwEzYOuTByfdGP+U3YDdDDkib6TwuS6iOIiNGMyUE+kuAWhQGi1RmXQWhATod7gs9sYv/pp6XWkvRkbPS+8r6dwNdRPHQs46MeT8lwzJnRV1zbGMLMtTqOVmhkamTBTn8qZvQvtzZ4sTk/hs3TfcwnvqQ/ROKz5PqCaXCeW+AYqJ/hquJcBZCMGRhmVq+OQH0cnaILjlTGkurXryFndbcB7N0PLfZ4xV2ySal/MZEH7Wx3cHaO0lgFjX X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c7a59ea-3518-4b7d-da4a-08dbaf3e9a69 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:06:01.8615 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 16/22] avutil/imgutils: Constify some pointees 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: dCkCeYpeKOH8 This is done immediately without waiting for the next major bump just as in 9546b3a1cbcd94e9107f85c8f1d2175efc6cf083 and 4eaaa38d3dfb8863a62f3646a62e4098b1c078d5. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 4 ++++ libavutil/imgutils.c | 14 +++++++------- libavutil/imgutils.h | 10 +++++----- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 963ad477bf..048232b2eb 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - imgutils.h + Constify some pointees in av_image_copy(), av_image_copy_uc_from() and + av_image_fill_black(). + 2023-09-07 - xxxxxxxxxx - lavf 60.xx.100 - avio.h Constify the buffer pointees in the write_packet and write_data_type callbacks of AVIOContext. diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 9ab5757cf6..da3812698e 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -378,8 +378,8 @@ void av_image_copy_plane(uint8_t *dst, int dst_linesize, image_copy_plane(dst, dst_linesize, src, src_linesize, bytewidth, height); } -static void image_copy(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4], - const uint8_t *src_data[4], const ptrdiff_t src_linesizes[4], +static void image_copy(uint8_t *const dst_data[4], const ptrdiff_t dst_linesizes[4], + const uint8_t *const src_data[4], const ptrdiff_t src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height, void (*copy_plane)(uint8_t *, ptrdiff_t, const uint8_t *, ptrdiff_t, ptrdiff_t, int)) @@ -419,8 +419,8 @@ static void image_copy(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4], } } -void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], - const uint8_t *src_data[4], const int src_linesizes[4], +void av_image_copy(uint8_t *const dst_data[4], const int dst_linesizes[4], + const uint8_t * const src_data[4], const int src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height) { ptrdiff_t dst_linesizes1[4], src_linesizes1[4]; @@ -435,8 +435,8 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], width, height, image_copy_plane); } -void av_image_copy_uc_from(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4], - const uint8_t *src_data[4], const ptrdiff_t src_linesizes[4], +void av_image_copy_uc_from(uint8_t * const dst_data[4], const ptrdiff_t dst_linesizes[4], + const uint8_t * const src_data[4], const ptrdiff_t src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height) { image_copy(dst_data, dst_linesizes, src_data, src_linesizes, pix_fmt, @@ -579,7 +579,7 @@ static void memset_bytes(uint8_t *dst, size_t dst_size, uint8_t *clear, // if it's a subsampled packed format). #define MAX_BLOCK_SIZE 32 -int av_image_fill_black(uint8_t *dst_data[4], const ptrdiff_t dst_linesize[4], +int av_image_fill_black(uint8_t * const dst_data[4], const ptrdiff_t dst_linesize[4], enum AVPixelFormat pix_fmt, enum AVColorRange range, int width, int height) { diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h index e10ac14952..91312a72d3 100644 --- a/libavutil/imgutils.h +++ b/libavutil/imgutils.h @@ -170,8 +170,8 @@ void av_image_copy_plane_uc_from(uint8_t *dst, ptrdiff_t dst_linesize, * @param width width of the image in pixels * @param height height of the image in pixels */ -void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], - const uint8_t *src_data[4], const int src_linesizes[4], +void av_image_copy(uint8_t * const dst_data[4], const int dst_linesizes[4], + const uint8_t * const src_data[4], const int src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height); /** @@ -188,8 +188,8 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], * @note On x86, the linesizes currently need to be aligned to the cacheline * size (i.e. 64) to get improved performance. */ -void av_image_copy_uc_from(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4], - const uint8_t *src_data[4], const ptrdiff_t src_linesizes[4], +void av_image_copy_uc_from(uint8_t * const dst_data[4], const ptrdiff_t dst_linesizes[4], + const uint8_t * const src_data[4], const ptrdiff_t src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height); /** @@ -319,7 +319,7 @@ int av_image_check_sar(unsigned int w, unsigned int h, AVRational sar); * @param height the height of the image in pixels * @return 0 if the image data was cleared, a negative AVERROR code otherwise */ -int av_image_fill_black(uint8_t *dst_data[4], const ptrdiff_t dst_linesize[4], +int av_image_fill_black(uint8_t * const dst_data[4], const ptrdiff_t dst_linesize[4], enum AVPixelFormat pix_fmt, enum AVColorRange range, int width, int height); From patchwork Thu Sep 7 01:05:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43624 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297914pzh; Wed, 6 Sep 2023 18:07:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGPIlsuCyXJD7iILN9mz/E8kEUcpf1XbsnzJWhoeIIHp6wzZYFFY5woJhuxMt2ASf0Agw6+ X-Received: by 2002:adf:e5ca:0:b0:313:f45f:74a1 with SMTP id a10-20020adfe5ca000000b00313f45f74a1mr3712190wrn.51.1694048835865; Wed, 06 Sep 2023 18:07:15 -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 r24-20020a056402035800b0052bd48275d1si9949299edw.668.2023.09.06.18.07.15; Wed, 06 Sep 2023 18:07:15 -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=ht3GJGOR; 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 7C76268C8BC; Thu, 7 Sep 2023 04:06:08 +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-vi1eur04olkn2049.outbound.protection.outlook.com [40.92.75.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 96F9868C809 for ; Thu, 7 Sep 2023 04:06:07 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I7e6gAb1ABKii8iZ5Vgo49AGmCtYMVLZd81tlSbEcM9jAemxXwvwsgbjHenWzH92XfGLSqGDdRZ+rqtWvXah3ZU2qRF3tyU8ectP246jgdG/bxANauFdlROJUmCrr2S+I4nAtgjAqSheBegoqXJxi+0jwJgxdLl7Mp8HCQ9GEJBdB5GG6GoFP9uyWFOC+hVA2xzU7fVGaBcMN8VfX9L3ZxxsYQDwnDYpt42O0ABNFr1+vGCiQgvdXyKGRsBUKCQmnOwKIz5Xw2Q1tqyOqCO74hHSkFTWpIWlN0wVnbyzvdudc799GlYbS4nwCIwLET7tFunXn3NCxAymFrKPhUff/w== 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=OTCVSryP5QpvNVkEzftOyyPNT3PGCjOJsm+CajePEy8=; b=kXuJDHUncPub07G7m4rWYs4CW/702dGXABOiFAaQ3lnrKwO6bDdpv0MVRn9wnZ/SOi9Nlp64P74gVE9gFhX8KVp2s1FQGj0V/LTqlJN87I7qGWOYTSPIykvqxbF2z79so0PZ70xa8FFH6ueJpvtRW1o5dNahVHvh6zE1XT6EraQz2iYHMcr54RrYxQXBwAS2lRDLYZ6pkCXoBS15rH/q89yTOrAazrH2+EMBL9OTt58s9sK09a9yiMtPcChXNhhuTYqLMV2pmieM/2b+UobtWLzEodTDfN9tjA3GEhqOewGwTXEgpS64CsGBuvmEUhbNEAI+V0oKkLwjKgePTP5ayQ== 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=OTCVSryP5QpvNVkEzftOyyPNT3PGCjOJsm+CajePEy8=; b=ht3GJGORkrxP7ylemSAjS/wkCdKiM4yoF2XwH6ld6WchzeJiI8269wRkRlXIq8YyMj8Vs5+dXQZ1RK9FvAC7iDCRJ4UkVltdrVCf9LjjsRZ/KR0ndNqckBQ5ku9uyFFp2ns9hqEPHERcPbsXDdDeM5V3ZCYXNDF1ly9cUZJ5D1Xh0CwUWgRSX/NSX6ErSeNYNxYN9+9ddMsaf2z2/umS3MyN4Zb2/gn40iNP7kY/9fMl/9YI06+kE2RASqyNeQaByG5FnT1NKuLIRddH1+Xm/adpm7DMfa3+2j/882rjkq8tugSNkMfcfrxIxtr6QOG17F+leq6xAKQvc+2yc+qsiA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0336.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:06:05 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:06:05 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:33 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [IMCB3HBYLIK0T/DE3Ff1RLv3VxgSi5sW] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-16-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0336:EE_ X-MS-Office365-Filtering-Correlation-Id: 375441b3-368c-4e99-92ec-08dbaf3e9ca3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VpXkY41fYKVaVz9cC/1+5Mi2/J7h1z1fXX8KpqWED+Plq3x9HxzeidIT6GzpjJ6EebeuYSNJm8qQc61zYpGBVDinwO8DAwuR5FTPyjYdo9DkYOSlLPVD1iAsDlGfzdw74F+to0EYuUcKJ8oASUvk0O5iI1sHzYbe9gAPCvTYD8opQ559vz0cAP2WsDvdq5OxFsFVICAnCQx4u1sJRtcYdv9ppzvhqWyRmmfvguB/UZULYKaJRwa953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4MUb38GP8kARAknakv3Lr1XlZDpbRadrgOSjArnR5c4DsvR4GYgdt904KHhaCRF1YgnTEdXksiBuCfyb9/mAgTXDo2J/ffe2LajE6GhNjKaqphgo9RYOT8guBJTOVUXfA68jQIw0mcUNPj3T1QMZmBqMS7MbYHzYiN1EIZgXM7w6o6AkSjJmrKC2c8iDPmRWZxgCmER7T/4uQfRZrI7kBtlzS5b4yzWNOgKFlcct22vpK5pt0+1bKoTYcVlVZF4Jb7zWIRtST9FYh5ioYAlyKXJWbKMEPdTo3DzDHI0b+JllyveeeuT6uw36jZp20HKQgNm0L9rMcXIqfWKh1v1hS2cNoi0bMryMeSrQp/5rvhnvJz+X3wZKwdSbZz1aNw8j4cRlyZzaU+NVgd+vQFBxLaLraJt+YhDRTJRem9o9rhJ1WAtSpOuGee2KUnVUs9LxFxsaWlB8NZ3eUjzW7mCqtdqhNgDBNjj6+jCKu0TfqAX3YwH7bvmqUmGm8y4LS/o/+Ec1mJuHfQR1ki9rqhw4cUlf3XgoQqsIk79lDgm2hSGzc3QXGDHbrA6QlhWTkcTf+PF6lnH3GmGJputnRwImXF12EulncIVsuwlTaKq1fNerlXwDqMLTayKUE6Li X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 375441b3-368c-4e99-92ec-08dbaf3e9ca3 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:06:05.5884 (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: DU2P250MB0336 Subject: [FFmpeg-devel] [PATCH v2 17/22] avutil/samplefmt: Constify some pointees 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: kwjFbTCUeVW7 This is the samplefmt analogon of the imgutils changes from the preceding commit. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 3 +++ libavutil/samplefmt.c | 4 ++-- libavutil/samplefmt.h | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 048232b2eb..c9f7a61e4d 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - samplefmt.h + Constify some pointees in av_samples_copy() and av_samples_set_silence(). + 2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - imgutils.h Constify some pointees in av_image_copy(), av_image_copy_uc_from() and av_image_fill_black(). diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c index 6d3ec34dab..e1be5f0547 100644 --- a/libavutil/samplefmt.c +++ b/libavutil/samplefmt.c @@ -219,7 +219,7 @@ int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int return ret; } -int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, +int av_samples_copy(uint8_t * const *dst, uint8_t * const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt) { @@ -243,7 +243,7 @@ int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, return 0; } -int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, +int av_samples_set_silence(uint8_t * const *audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt) { int planar = av_sample_fmt_is_planar(sample_fmt); diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h index 6bad0e254a..43a57a422c 100644 --- a/libavutil/samplefmt.h +++ b/libavutil/samplefmt.h @@ -246,7 +246,7 @@ int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int * @param nb_channels number of audio channels * @param sample_fmt audio sample format */ -int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, +int av_samples_copy(uint8_t * const *dst, uint8_t * const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt); @@ -259,7 +259,7 @@ int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, * @param nb_channels number of audio channels * @param sample_fmt audio sample format */ -int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, +int av_samples_set_silence(uint8_t * const *audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt); /** From patchwork Thu Sep 7 01:05:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43625 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297985pzh; Wed, 6 Sep 2023 18:07:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHy7NPUHd+vMX+QrST7Lzm1RH0kcI3i/CxjsyYTZphFVwJqm5PknOHUhIPUz6mH2bqKko77 X-Received: by 2002:a2e:7d0c:0:b0:2bc:da4a:4649 with SMTP id y12-20020a2e7d0c000000b002bcda4a4649mr3737553ljc.22.1694048845240; Wed, 06 Sep 2023 18:07: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 st7-20020a170907c08700b0099c49a11e78si9895667ejc.975.2023.09.06.18.07.24; Wed, 06 Sep 2023 18:07: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=BUaYPo5z; 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 EF95B68C8C0; Thu, 7 Sep 2023 04:06:09 +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-vi1eur04olkn2040.outbound.protection.outlook.com [40.92.75.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D03E568C809 for ; Thu, 7 Sep 2023 04:06:08 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nwiTBQvUumpP4P3BSwsHCVO40A4KaccsmtY8f+rnzbpsbHdeFJ+ZjaX4MKGnPh0MwIIbJXIWcDSVHP413hKUoQRl5BdEFJUJXydsg1kXxakx6kjDYd6Y282UtSAcX1So6QHj+k3dFAffcIe8utdrS40AoC12IISMGSzADhGi64uhSGTfwVOCsMQ3qnLOix4/I2OvID0vZbjoLaMcCThGuGa65n2oV4cinAoqYPm85bCG/+IHwjQyQfP07ymdR4McPiGrf/R9OaIyOvD/VtnTHXj/pW/gblh4P93HmK7hO8nYw6yMJwQn9PJOvASxpwZluU0jFo3BSsHsgQX39kVx+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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=beT5VVBa13muaOyeeyrw9Vjjc9/emtPk01AmFO9rPh8=; b=mRB044UeJo8YPTcZTaHjkG5qiTa6JA3qYghZGpymWc2lCncLLDoXWUBOjxxiynYIodTrZMXwX9dXpLWXJr7mxwK5xIC5uQcxllTz7GfqH/YuETLxMdKNUXsS02l/uTD1tTAO7sQbOb7NZ7HF0AcsjA+i39XqsRgFQH8xZq+wiO186C5qs+8DAzQGWtT+xPm+o6Fw0svESXNdbOkNYait6+yLRhrI0/1uYzz89t37+g0i5CbLkr3yoW6a3wm/mwUmNPq7S95pW4hAg/t1EdAdH3lzV9qv371AFb+mN8IVYux/YmW+5cjt+HHYVKlirTWqx29+Ybi7Lf1uknpJzuhG3Q== 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=beT5VVBa13muaOyeeyrw9Vjjc9/emtPk01AmFO9rPh8=; b=BUaYPo5zKs34JVZ//yoZpTWPerSZndSJ55TtYKChi/D5wrKjPumv5X875OcsTlwswKkUKovJirAi23x2tsrI2xlxmQq+ezf+46oiOfcYlWyFrPvef/Sj+SUEMML7LgOlyeHDALaZUElJcKIirBXGgRPa8SMk9LY8upv4cOvpyCK6TKaW4hWiEQYCwRAw+ZdRrXoImlkhGOkvM0WWdJfvnMKXFjgKcBILZP5eil4YthBHANwi5QHoazWUznpYsCkcfidMO+SvfCuQ2smwCX6uY4g0JmzpFaVzo3Q3Li1jqIv/wrxbWd78T++iQeBe3rp8LIOyxVKaMzGYH30P/sdONA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0336.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:06:07 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:06:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:34 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [2W9lxCJohi/JgaacTh4mbDS+tdP97toW] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-17-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0336:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d7533cd-06c2-4edd-3ba4-08dbaf3e9dbf X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LFoPIryqUjYEYOAE2YSmzL6R/RttVotAl6165aZtn3ICW9m2G5iyTQYjTrlPr3m1qeNHtljNyxxM5wUvudu4n7sJ00nw5BSekpA22IG2I+BWLOS6XVZmT9sE9qLclt4EBXEx72lk8yNvdCaMz/HNhR8S1/ToWZM632ckpg54+WPZKGCUKvh3JRPIi7eo1Nf8Ih9awVG6mnbo+vEZXNmeudLFJOTPVtouPShcZboeXq/e32oJv9VH7lOKlDmwytCvlEc1QFJ7eS5dFoMl3wD93lpU+jbnfyZ0EsKc6IC6WdrzVFWL+NfgvRoZzcyWUEzJoYF752sZ9bQVHs3UER+pG5kEH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bY8q9ZTwRGSaIAQx5mk2Rk0TLknC0wyVAXvVjd30aap74MbTYi+N/u7yEChfRQpcgDM0GQL1mzM1BRLXMxbAIGDPlXBb6ltSUWM25jFg4c2cEGBpO+GQy6kglzRBkbaAVbSukHbtgAam4hCSEuN8SgKkY4xn7pivrdFd90DUIS48hW0PQGSStp7m1YMltnOgpGivkDmzle+9DiH0OHkp9t10aVSycBmA+NbOA+90Y9rsbEN6IQU8Sb5c1p5sN3xMO+vKJM/Q5BjEbQ2pNE0rB2eJeMlZrLQTwnjF9qxZOb1SRgVG+swVVTWGCzVLrnKvvrS3nTu8EMgGkNbib32sRTsvYOEucY18tPoen7N18iifPRySUOkRhMbecZ0xYzul93IvT4hbCV2Jz2/Kt6agn3Nc0/NQmNwzZDKCC5PHS9fUM9V/uEVI4z4Pnli2yqPJFU42Q9s6fhOPfrTguOwRLrLoPPrHk+djoTDzphNsPxHHBG9RyM/b7Jccwk5aQf0E+oCMEIhgHiEGlPygTBeSZ6eJ5FotL2r X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d7533cd-06c2-4edd-3ba4-08dbaf3e9dbf X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:06:07.4871 (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: DU2P250MB0336 Subject: [FFmpeg-devel] [PATCH v2 18/22] avutil/audio_fifo: Constify some pointees 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: nW597Yl16nYI Also constify AVAudioFifo* in the peek functions besides constifying intermediate pointers (void**->void * const *). Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 4 ++++ libavutil/audio_fifo.c | 9 +++++---- libavutil/audio_fifo.h | 9 +++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index c9f7a61e4d..2dbcd47fc3 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - audio_fifo.h + Constify some pointees in av_audio_fifo_write(), av_audio_fifo_read(), + av_audio_fifo_peek() and av_audio_fifo_peek_at(). + 2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - samplefmt.h Constify some pointees in av_samples_copy() and av_samples_set_silence(). diff --git a/libavutil/audio_fifo.c b/libavutil/audio_fifo.c index f4103178ba..dc2dea9b2d 100644 --- a/libavutil/audio_fifo.c +++ b/libavutil/audio_fifo.c @@ -116,7 +116,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples) return 0; } -int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples) +int av_audio_fifo_write(AVAudioFifo *af, void * const *data, int nb_samples) { int i, ret, size; @@ -142,12 +142,13 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples) return nb_samples; } -int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples) +int av_audio_fifo_peek(const AVAudioFifo *af, void * const *data, int nb_samples) { return av_audio_fifo_peek_at(af, data, nb_samples, 0); } -int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset) +int av_audio_fifo_peek_at(const AVAudioFifo *af, void * const *data, + int nb_samples, int offset) { int i, ret, size; @@ -171,7 +172,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs return nb_samples; } -int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples) +int av_audio_fifo_read(AVAudioFifo *af, void * const *data, int nb_samples) { int i, size; diff --git a/libavutil/audio_fifo.h b/libavutil/audio_fifo.h index d1e4c856dc..fa5f59a2be 100644 --- a/libavutil/audio_fifo.h +++ b/libavutil/audio_fifo.h @@ -91,7 +91,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples); * code on failure. If successful, the number of samples * actually written will always be nb_samples. */ -int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples); +int av_audio_fifo_write(AVAudioFifo *af, void * const *data, int nb_samples); /** * Peek data from an AVAudioFifo. @@ -107,7 +107,7 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples); * be greater than nb_samples, and will only be less than * nb_samples if av_audio_fifo_size is less than nb_samples. */ -int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples); +int av_audio_fifo_peek(const AVAudioFifo *af, void * const *data, int nb_samples); /** * Peek data from an AVAudioFifo. @@ -124,7 +124,8 @@ int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples); * be greater than nb_samples, and will only be less than * nb_samples if av_audio_fifo_size is less than nb_samples. */ -int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset); +int av_audio_fifo_peek_at(const AVAudioFifo *af, void * const *data, + int nb_samples, int offset); /** * Read data from an AVAudioFifo. @@ -140,7 +141,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs * be greater than nb_samples, and will only be less than * nb_samples if av_audio_fifo_size is less than nb_samples. */ -int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples); +int av_audio_fifo_read(AVAudioFifo *af, void * const *data, int nb_samples); /** * Drain data from an AVAudioFifo. From patchwork Thu Sep 7 01:05:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43626 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp298069pzh; Wed, 6 Sep 2023 18:07:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJj6+xci4nLkiUCOGgA2I/indWK6IBx1To6T9TqgANEolfHOFHJuNNv7fCiiQy2mgfXlCu X-Received: by 2002:a17:906:18aa:b0:99d:6b3c:3d40 with SMTP id c10-20020a17090618aa00b0099d6b3c3d40mr3769436ejf.6.1694048855641; Wed, 06 Sep 2023 18:07:35 -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 k14-20020a1709063e0e00b009930d4e327dsi10082286eji.880.2023.09.06.18.07.34; Wed, 06 Sep 2023 18:07:35 -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=KUiASG+x; 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 BB00768C8C5; Thu, 7 Sep 2023 04:06:16 +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-vi1eur04olkn2010.outbound.protection.outlook.com [40.92.75.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6BE1D68C859 for ; Thu, 7 Sep 2023 04:06:15 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQF8dqEFk54e86BKVTV+cQ1MyxqCIVM6XVLtioCA7YPd+LFiPil5GCzUhmhnEhefppMaE9GlzHVtfnN9qn9lMzAT8vtodn5TopXhhxZf34SxFvn/CAOEe2i0Gtm6lQZUAAEtpr8fEsofZ8f9MSQte+ubJkshWYXoEX1DuoraiLYeILGg6L36eL4AW3iz0UpIZ4GdG7SYGgawWXHw1QeoxfhCJBwaZhZQKWRlf8O85a8TY8atPNd0i+lnJjukp6tpfJqqgdDNrlx92QHjsjtjGnamFcpR6f+wikN4gOijweWJJXQ+89O/MgFNAu5isQ/r8fUABnGolfEfATWGMtcEIg== 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=jgWs44qXmMLMeaSgC8u+T5+Km+UxS+pFd86/gzjseRI=; b=ZtGwl2VUfZcuYmHwUhi+4JZwbQDtvhxes2IipqOKThmZeBoG8pPRDIKnBWX3eFNYCaZAtfYFDLqaRNm0Alupctygl0Bl3jSfRI4NgAhdMPAIrZTzB0bMlC5m732bUKfL8mvaUmAH6FUrLkVQ+CkB7zFZBxjqQoValuWYxhcID9uOkaNR4aJlpM/sb/+QsQdmHexQB90nmz9O8F8fAeTXyqppXbEeD6gF49lUW6wSTrlJvn/JF9IWnP0Lw/b68iWrt3HGiSzI1DCcDwUVCW7GIRfKfgIfgH7nMJj9lyaqYQDw8tS9jPf0Cv7YxMOYILN1ofqYe6IPFFlAU5ZrXYkeiA== 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=jgWs44qXmMLMeaSgC8u+T5+Km+UxS+pFd86/gzjseRI=; b=KUiASG+xnhUU48v5dvFFrsW8F9qCI/3uudle9WzaadW0iglTXhCT181GB2TqTvp8lDl+CzqkzlRQgnNT2Q3gUunhIoy56YtWu0ZHQHwdONN2rTsvmql4lHFOdUxPqGh0DNCIy4Gq+AbGDEGmOjarIltQ8G3WElW/CVs9JerSPPeMXSebU5umFKmdXKgUwn9RwozhVe4crgGQvwqvieRvUpS5hkiyDFgyzVIXsaBiB03p8uX9Y9LbbYyJWb8qlVIVZpVaJdHVToBMx5/jj+ajProXrRerlMtgAP8njocsWzDsFomp42UMUCiovqu3Str5OPmp7Mvz8yKQkGoYWiSVyA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0336.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:06:14 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:06:14 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:35 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [xOw4ieW96LqWAb3pW5tEYiOn+kfs7AGq] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-18-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0336:EE_ X-MS-Office365-Filtering-Correlation-Id: 585ea8a9-0fa3-43ee-2c02-08dbaf3ea1ad X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yZ97VMr/VbxrieJ7VTtNG3q600IgPK6EXJ57PoF/8OefQgV/nmcOLbh7lVjcbUwOJyFrNsxMJ8jpiT1p0935/tjSde+lqhwfpGPfetUhQr2+9V3HsFbqsokp3FUQgdb4OcLoJPrePOS/qHBs04cIVBwgHpFXlMydhuYihyJno8+1FyYdlHsMPWZ8rjBk50Z2OkbEh/s8p1U7E0wFvelqGCJJrtNTQ4x0ok9RLYw8B1w/PromLVctQCoCsVy6aJywr71BcLoVLm96Xx8MtHMjvtrTNEnvpwmt8ZZPaPh7B3p1Fw/gqoECSa4aXCG3V+1TqLYuxfaHze23/MzM7bU6iGX8TkASewYSwjs8vrskkqj0xB72gfZxp0WjIShQYR6ugO6TNvu2EV+iUdy2EdMRVIaVJPiL7rYuJM5p87dio3XgaD2AtuerPQ2icWvg+R/lc+T8w8ggFtalwtVtpVgQ1n8El47Fkeg0+MfqVCwx+9o4sXV8kgR4J0agLzS5jLBZSOCtcLqY5jS9Y6GZEy9xc7S+bsCpmu5q6uESznnF1F0p7abRw9XsRTcn8bpMs0hXawchgbNa0F7e2p+j0b7/ZhWmaj9u2CFbA8DpJy7ynUM= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4QZYmulabv94ISIBJD5RU9Wt00wU1gppM/lM5pOyuiCCJIeZNYgYnabZH1h5oMduAtppPhmEIOsPgkQWZPs2erNGujMUQ+f3bfJOM5gNu8b3D4GK6tagmD9qkNhj6XPTKVsdKLvuSdCtzGJCJEbdgBNMwb8InEQMeu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TTuo0KNVxDi/mBAjA2eqhFxDdM6hNz8j/yDjqq+mgj X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 585ea8a9-0fa3-43ee-2c02-08dbaf3ea1ad X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:06:14.0530 (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: DU2P250MB0336 Subject: [FFmpeg-devel] [PATCH v2 19/22] avutil/fifo: Constify AVFifo pointees in peek functions 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: p0jgyt7k3ul2 They do not modify the AVFifo state. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 3 +++ libavutil/fifo.c | 4 ++-- libavutil/fifo.h | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 2dbcd47fc3..0914a4da32 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - fifo.h + Constify the AVFifo pointees in av_fifo_peek() and av_fifo_peek_to_cb(). + 2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - audio_fifo.h Constify some pointees in av_audio_fifo_write(), av_audio_fifo_read(), av_audio_fifo_peek() and av_audio_fifo_peek_at(). diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 9b32f708fc..b0807abbf7 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -252,12 +252,12 @@ int av_fifo_read_to_cb(AVFifo *f, AVFifoCB write_cb, return ret; } -int av_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset) +int av_fifo_peek(const AVFifo *f, void *buf, size_t nb_elems, size_t offset) { return fifo_peek_common(f, buf, &nb_elems, offset, NULL, NULL); } -int av_fifo_peek_to_cb(AVFifo *f, AVFifoCB write_cb, void *opaque, +int av_fifo_peek_to_cb(const AVFifo *f, AVFifoCB write_cb, void *opaque, size_t *nb_elems, size_t offset) { return fifo_peek_common(f, NULL, nb_elems, offset, write_cb, opaque); diff --git a/libavutil/fifo.h b/libavutil/fifo.h index 70f9376d97..ce3a2aed7c 100644 --- a/libavutil/fifo.h +++ b/libavutil/fifo.h @@ -200,7 +200,7 @@ int av_fifo_read_to_cb(AVFifo *f, AVFifoCB write_cb, * * @return a non-negative number on success, a negative error code on failure */ -int av_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset); +int av_fifo_peek(const AVFifo *f, void *buf, size_t nb_elems, size_t offset); /** * Feed data from a FIFO into a user-provided callback. @@ -217,7 +217,7 @@ int av_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset); * * @return a non-negative number on success, a negative error code on failure */ -int av_fifo_peek_to_cb(AVFifo *f, AVFifoCB write_cb, void *opaque, +int av_fifo_peek_to_cb(const AVFifo *f, AVFifoCB write_cb, void *opaque, size_t *nb_elems, size_t offset); /** From patchwork Thu Sep 7 01:05:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43627 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp298126pzh; Wed, 6 Sep 2023 18:07:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcCYEG6rJnpEKZHDk2qN7JGiPwF5+r80x3mzZEsbTRe5j9tGiZ3WY3kzQZrxlZomP78Zae X-Received: by 2002:a2e:9c94:0:b0:2bc:d607:4d07 with SMTP id x20-20020a2e9c94000000b002bcd6074d07mr3014370lji.11.1694048864553; Wed, 06 Sep 2023 18:07: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 qx14-20020a170906fcce00b0098295eed929si10239486ejb.998.2023.09.06.18.07.44; Wed, 06 Sep 2023 18:07: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=GtA8vwwB; 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 C586168C8CF; Thu, 7 Sep 2023 04:06:18 +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-vi1eur04olkn2077.outbound.protection.outlook.com [40.92.75.77]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E956468C8C6 for ; Thu, 7 Sep 2023 04:06:16 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kBSwkEolb0P56t93CdSDPtJJKgJJ3BK6H5zhP3Ea4/mNKU0tDaGV59zD/Dfnf1Q71X8xudzSgEloKWZ1jWXBUxrku9bUEoNplqeX98uSorqrXSFeLtwesxYOPoa+Gn29sgD27tKFN+MMwKMQ7Xk3+ywxtxZUdpjVMm4tIN8ZWCVw2PTA0nuKxollzrwNkc3lin0VnGn4zSkmdEeRjo5OU90yqfwTS5sdFC63jklynIJ6KI7iFey0WZja2msO6qS9Fkwy1VgrRaLZ+6G8vvAq+hNtBEPJDN3sGC9CLjBmRz2vUxIIJrK53s3kTij3pB+NzIX7brR+xwrMxdr72xOfIQ== 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=px9F5kNI8KqT1ij6clKGOqEbljfPWk6/fHOtV2FIsKQ=; b=RaEycGsQLgeKlufSYaIchtgP74ZhyE4m2LZOYxeMZzGecWszEytLfPypywZlV4Lv78kGi3ch9+aMP73HaC7c4jTu0Yyuz9TCD6oUZdNYi54it3dIaoouFMx54KyhAwquBaS3lRovyvIjQQ2s+Ure0FS+ldTjGifXVxcTg3kq5YCXCUSxpFR4zWh0nIWJ4FY6Gwlv+0HQyWgxFerwLGPELsoV9yLvYXTP5gopJ4ycrLAfOh0gxMIoQy2HcY5MlXU2QulY8pPC7BlsaOq/DtIVqlINKGpQYigR9KNlDQepQ+acN7/dlAXM0ZffG9d+nkVrQ86UrP4QMABJZXqsMmvYVg== 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=px9F5kNI8KqT1ij6clKGOqEbljfPWk6/fHOtV2FIsKQ=; b=GtA8vwwBIkaFACxjnomTtIe4GjWSt5Yc3g/BhP7xA6eCpSKKXld2mvTA0QZtb0o/iqzQfFoxgUCB2tLKoRxCQGiYH8c8//Z6MqEZpCv+wiXVXfTBGxSgSMaE/vGOZNDDYztCPA2YsdfGmtz6qV9ZJUCbAdo0acbSygUmnnpBWuL/RMw0ZmKvcm0HHBr708RM9YsOY+Es3h3vZ55j5Tyc+v2ooey5lzkBNyCN5t6zLLlBSyS6REuz8zqrQF8CAVDMYOE2n5VuvP+p1SYYXYdWQlpMxm4uvgJQgtBoinXoPA9IJX3LPYKTKzJif/SRD0jIX/x58Z1w8hqvqwrqdzEhfA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0336.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:06:15 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:06:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:36 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [WRAaBM/G10kl9WtGmD57gLmou1hEZM1D] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-19-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0336:EE_ X-MS-Office365-Filtering-Correlation-Id: d9847eb7-5c53-46e5-651f-08dbaf3ea294 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3ZxdEY8daIGKg38IInhw77naxep+ZRf6K1M5mKFddi9rXuC7g/JKwJKNUFA0w0UjO9TS4FVc7+lnqn9pzUHrd7CiqLRqMbBm1XevSwyMCgj2rXILNOHEVyPJv/0wyRoSzUECohRxBVWWK9uwgsVRYsE93o7Jsf5g7t0uAx30q2nc5/3shkOX/tFpQ46JCUf4t2r4ziGOy32bXOxLFJ4hbuYhgv4dzpLh34587yEuLwI+K1vpECboLKGO3Jya5ds1ub0/Fg7YRCysUs/z+TaRRucdSxpgYFXT5VVYLHJSSC95/PN1nIQbmKS+ocGoy4SqNPf6B7EZsUCQHxmDQNtV4IeEmZD01cK7oW+8g17nbVunOVmbjaC+FWcLhaspAZhDC39mJ8hwg2Ys+lh910ZxGuGrjvXSrtq1DgcnHjbUkBr43zlDAifkjTclKn+xeM/iRPbIg2i7tRlLW1zK1n+WQoVpXO7FtXIJjWPCwRJWrtvS+9KzluJPzJZQ69aQqWq4zJLUTnv48s6zdh3TOJBC5JKq1rUIbDtxJ13j/5vdjCLOiGNeVCNsFGgIgGxOY4DXPkwlSnORJw+1xTtuDW2Wg43lPiSDVou5ogSC5JEkUbW1dMi7S+3jUj1Lw0Wo0m+X X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: O1yn9ateWv/b4594EMn+asKFZZzkOqFx5C6O1V57xBgP47XRBwRufWITPyrKPOTEO4wMR+ezQTcRc8p7eu25VNKU13MAm85ZvRJUMj+4zWzZ7HJBfPKJ0l4GT+pFNbChTlM0kE7YoNOY82S5CfL6kze6bvlRUK3blTlXmk7hNcMT6TTmTQuXov+k74Tzii7kyQxIUIm44IgDjsrVyekXYUnps0ORrG8CPi39acgeY2j6+2hiWx6Ap3mzIIyCsPiRS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-651f-08dbaf3ea294 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:06:15.5803 (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: DU2P250MB0336 Subject: [FFmpeg-devel] [PATCH v2 20/22] avcodec/v210dec: Don't cast const away 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: Q03VEGEIMxcj Signed-off-by: Andreas Rheinhardt --- libavcodec/v210dec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 814d65bbda..04bcc612b7 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -33,7 +33,7 @@ typedef struct ThreadData { AVFrame *frame; - uint8_t *buf; + const uint8_t *buf; int stride; } ThreadData; @@ -111,7 +111,7 @@ static int v210_decode_slice(AVCodecContext *avctx, void *arg, int jobnr, int th int stride = td->stride; int slice_start = (avctx->height * jobnr) / s->thread_count; int slice_end = (avctx->height * (jobnr+1)) / s->thread_count; - uint8_t *psrc = td->buf + stride * slice_start; + const uint8_t *psrc = td->buf + stride * slice_start; int16_t *py = (uint16_t*)frame->data[0] + slice_start * frame->linesize[0] / 2; int16_t *pu = (uint16_t*)frame->data[1] + slice_start * frame->linesize[1] / 2; int16_t *pv = (uint16_t*)frame->data[2] + slice_start * frame->linesize[2] / 2; @@ -191,7 +191,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if (stride) { td.stride = stride; - td.buf = (uint8_t*)psrc; + td.buf = psrc; td.frame = pic; avctx->execute2(avctx, v210_decode_slice, &td, NULL, s->thread_count); } else { From patchwork Thu Sep 7 01:05:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43628 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp298222pzh; Wed, 6 Sep 2023 18:07:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHcEDe0KfQWnKIUo0L4Sc5uxwBGX109WFj7vTPoaDuHkmwjgGRjfnte4V5t0wGsVgKwxYf X-Received: by 2002:a17:907:a069:b0:9a6:4fcd:380b with SMTP id ia9-20020a170907a06900b009a64fcd380bmr3189467ejc.73.1694048877073; Wed, 06 Sep 2023 18:07:57 -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 d21-20020a17090694d500b00993181656b0si10490606ejy.475.2023.09.06.18.07.53; Wed, 06 Sep 2023 18:07:57 -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=m1hcvfnm; 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 C8FDD68C8D5; Thu, 7 Sep 2023 04:06:20 +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-vi1eur04olkn2043.outbound.protection.outlook.com [40.92.75.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AEC1168C8CE for ; Thu, 7 Sep 2023 04:06:18 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OhCvE6RpccNArB3pbzrV92NlB82IxfE4EVAPGxJPJVutwDJSSa3MrMatNgEqUGOVnH2DJbmEAphj3hr3D9/H00SnzXo6hXZLgFeV9RLcLSImcCuRevbq7GBEbQ8E6Nhy78jcB6zaPDN6Y4brDU+/cGBolLTXEtZSYhiCbDCyKeX/rff2P3sGXRXPGfLAB3bhhop3gkcOqZRr9dO+VQ8ZPBwRQ+4NTDuL9g5GfCBqbGvo4pwC65pC7sumoXUeagXTsAN8ct6sCqfM/BN4OGW0LnxV2ULKBNxAwdhM4pMvg8lmrWR2TAX+Uv2YN0ZuD0nCEfKQA4A5ilu98Yl/jr+v0g== 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=PQMBcu07s1welAQdO+rXtsl02G/yEwSBo1QU2rCLGHo=; b=QJlhFwX7grwqb6xWF0EA90beywxSrMk55bkkbh6X93b7svSFPl4UPeeVK8X7wimUw21T//xvvyBn9tChpeMTHXjnrs0NDqLTFrwrRI7PV3Ua67kVUPh/QTzNXov4UO7ZuVLy84xZxHaU6QazdN0qoLAU98lqr4l+gaJTvSjW+0tN1C7/TG4oYmv9he9pRc9rVFKB6lBP1gphqlvuB+mo/unenXpKdPrhaJnyg5AGnHZ1urZ2zSl96u0Bon1VXPJjMpKhUy9qXPYY6VD7cnl7K60rZCXI4vnG64T6coeEVwTHJggnmQAlT/ScjUGyOLtnNixkhpoH1FPWY/oiQqsgUw== 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=PQMBcu07s1welAQdO+rXtsl02G/yEwSBo1QU2rCLGHo=; b=m1hcvfnmR1+ICt9O7mBmP/QAVaw9j2p8iN77vBa9qVJwbsj/rHVTF1yvuUMuLIQPCoJfHym4Vkm6W3gGOsOGTt5LhpxfgMoF4T/XE5nWfjq9iyPudH2bEjTB1cjz+YZwQJdsBOPrEuK9aCaKI0CtI/VexUaDeGLigbc5dx4EEsbZ1ao2TMXqpRlP6CDW+djFA+naIubrt4SNB+IUtQeseDr9yVfE7QeytSbf5eVTQUfn6Dfkal6PJBnTClXzlx8EKCbiLsZk99ylgsq5g4eSqoJEiQDQB4HUZkHnlwmK3VCGS7666Y6nvejnkybxe2U0hjZt8Oa6v4Z4wxvNANLqbA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0336.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:06:17 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:06:17 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:37 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Q+LwYdVTB42Z3jMEYQ/jh0+sgN/oFsSt] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-20-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0336:EE_ X-MS-Office365-Filtering-Correlation-Id: caf9ffab-70ae-4726-db53-08dbaf3ea376 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cSrIBxRVzKIftwQHeZYZUFLuqEHNDYj15InV30HgE4b+/Eq6Ln4EF0s6/Pe4fU9ukHnSYIZ5faAUEBqHiGBFMxnRMg9WSFEo2sNgU13y0cEiLORX4Luuh9eJvyTT/PSmIBa23RcJ5hR9i6GILdFiQgaQdi9WonT43BlbK/V3ptGjQEXe+OkHLaC4jtsHIdxu6B5dlSkVWECrqnYHhR8Y6JOnc6nlNhjtniZUnRYfFz3bXFrPXbsFzFeobo8DrCYFB3BYrW4FwRH4jH9eiEPeojmM592SkUUwRZqySQsM3QKPFz1k58xxObE3iZ9wVrxWNgEJ+yxVleV/KUAAhNNPM4hcXeyUhZnRqpZGP8feHKsFGxCmKvvRo0W/nCeaRa78czf66mHKqpfTqGU3K51TKBlC4x9OzOh0j3+8ONSf3+4IU2MwK8vn+5UgoEAFI3TqRW7x9zjPOUE3GU04GMNDPUdAsSdGsZqjj/8OuDRLVLuPxibKEeD8/bckQQ7bQkWvCLj87D1qe4U7HY5taUdkvnR+z7loozErXRwlOLhAAEtOFzQjINRthAfa2Csg3shpEge6bwZdM8lSReBskKcRcd4c+G++6rezWEU7fHP1zI5bbiW95v4vjodp6bKTzq+J X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iKroCOuf4ypal6nKW4C5593cg8tMF6XlG35h81bSPKE96vVVcZ+cI+obK1bdKvurhXUP7fsdHBPdRNhokFNsAsM56VTIy1+5FLTnVypXlImewfJ1DlvoxisdW4NWI4z8SOXRRJR4/8oAQEfXWNRMIHJafUKux/cnEwSrPa/piSG7HenNw7ONVC4oSaDn5FQwk2W09YRLDCywCMW1Hk58PqqPn9ks8qCSSTXUqlwCOSlUrnjm7npF8dYmLRjfRTHppwnQ14N4nGnqAPgiJWQIe9VeXYtHCFU6hU4MqOXk7pmDCN4kwf5A3EpXdfiybayRtjV+iAjnY8I7jsv9vRAhDCN/7SrgEaXwP6PmcOk1U944ugfLIYoQJ6IErLtJszRh84h1SufTujnrwyI2/jH+fpUw41Ilas8L5XPfhDndVw+pTzCoL8cGzubH3DxQysllyR3K45/TwAvBKHY/ibSnbj+y6/rhhT90xfsf4V4i/lVFkL1cpdbmFDTIKQVu4cR+cN5zssP29fur/adfXp+ubomC+yW0/Cmt7uOP2roF/aKGVf8LmCWTJxzLegdKn+6iEZRJa62kF1P1stObF7gydTsH8K2FwZ1ZGBkhoV8iI3wW33QzTX/3OajU1FIctONGUQg57kkQjk/Yo7tuzBhE3k5Xj3Cu9xR2amPJ8iv2Azo195r9DAeNKc13ni2nxCCSpLKkwDIblwNimL0TU00lXVAdnswFr4R/ysMKkJ/wmmqtcs0I3feH1qVzfcABJF0xmaYz9hSEJyK3DdTfv+dXKbbDvWjfp43qKajlUiIflJoauy7qTsIqK6G/Cs7SgooCjn/GPo6pANvDYm/b+douQtwM9/pKGNrmLKmRkyox7iUH1581cD/Z4wNamk9l2if3nJJ8RLuUjlCt/8iu8svcB0SO+dJsxfUhtsfc53YbBx2rwroFo+o/z4pr0SoBfXw30c0rBsOm1CxbSRyLWpV706VBn9IgWCPfezZGir4jOna7DDXEgfDoS4nYQdpgdv9mw6Nm7g3MxmkCyI+xw8iFyhtpb16tQ8eZopGUw4uqRsL8C9w/jmgL+z47Khwn+pXKDHVT8Z4ALhocLccyyUy8u8ps7nbY9zs+lKUlbFA8PzpJaXnpI7O+F3OSrn3dVFtpMAZtinRlCEPNw9coWieiqo1qZxqAvbPBmr8tDufQcpudGNBcIQaVKJztG5DhwP3XBNCXZO7wg4GTRHThQMYI/RT5Xzk6LkhzM4us3EcuDVY/JuSnCw9bxVlS7yJpW80F X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: caf9ffab-70ae-4726-db53-08dbaf3ea376 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:06:17.0713 (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: DU2P250MB0336 Subject: [FFmpeg-devel] [PATCH v2 21/22] avutil/imgutils: Add wrapper for av_image_copy() to avoid casts 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: Vjvl55eeQwIl av_image_copy() accepts const uint8_t* const * as source; lots of user have uint8_t* const * and therefore either cast (the majority) or copy the array of pointers. This commit changes this by adding a static inline wrapper for av_image_copy() that casts between the two types so that we do not need to add casts everywhere else. Signed-off-by: Andreas Rheinhardt --- The same can of course be done for the other functions affected by this issue. I just wanted to get feedback about this before investing time into it. doc/APIchanges | 4 ++++ doc/examples/demux_decode.c | 6 +++--- libavcodec/amfenc.c | 6 +++--- libavcodec/libkvazaar.c | 6 +++--- libavcodec/libopenh264dec.c | 3 ++- libavcodec/libvpxdec.c | 4 ++-- libavcodec/mediacodecenc.c | 7 ++----- libavcodec/mmaldec.c | 4 ++-- libavcodec/nuv.c | 4 ++-- libavcodec/nvenc.c | 6 +++--- libavcodec/omx.c | 3 ++- libavcodec/v210dec.c | 3 ++- libavdevice/xv.c | 4 ++-- libavfilter/lavfutils.c | 3 ++- libavfilter/vf_framepack.c | 28 ++++++++++------------------ libavfilter/vf_pullup.c | 12 ++++++------ libavfilter/yadif_common.c | 6 +++--- libavutil/frame.c | 8 +++----- libavutil/hwcontext_d3d11va.c | 8 ++++---- libavutil/hwcontext_dxva2.c | 4 ++-- libavutil/imgutils.h | 16 ++++++++++++++++ 21 files changed, 78 insertions(+), 67 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 0914a4da32..17e7c91f02 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - imgutils.h + Add av_image_copy2(), a wrapper around the av_image_copy() + to overcome limitations of automatic conversions. + 2023-09-07 - xxxxxxxxxx - lavu 58.xx.100 - fifo.h Constify the AVFifo pointees in av_fifo_peek() and av_fifo_peek_to_cb(). diff --git a/doc/examples/demux_decode.c b/doc/examples/demux_decode.c index 298a369f43..f26611d8f4 100644 --- a/doc/examples/demux_decode.c +++ b/doc/examples/demux_decode.c @@ -78,9 +78,9 @@ static int output_video_frame(AVFrame *frame) /* copy decoded frame to destination buffer: * this is required since rawvideo expects non aligned data */ - av_image_copy(video_dst_data, video_dst_linesize, - (const uint8_t **)(frame->data), frame->linesize, - pix_fmt, width, height); + av_image_copy2(video_dst_data, video_dst_linesize, + frame->data, frame->linesize, + pix_fmt, width, height); /* write to rawvideo file */ fwrite(video_dst_data[0], 1, video_dst_bufsize, video_dst_file); diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c index 518b8396e7..061859f85c 100644 --- a/libavcodec/amfenc.c +++ b/libavcodec/amfenc.c @@ -430,9 +430,9 @@ static int amf_copy_surface(AVCodecContext *avctx, const AVFrame *frame, dst_data[i] = plane->pVtbl->GetNative(plane); dst_linesize[i] = plane->pVtbl->GetHPitch(plane); } - av_image_copy(dst_data, dst_linesize, - (const uint8_t**)frame->data, frame->linesize, frame->format, - avctx->width, avctx->height); + av_image_copy2(dst_data, dst_linesize, + frame->data, frame->linesize, frame->format, + avctx->width, avctx->height); return 0; } diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c index 2ef34dd82e..0ebf37607a 100644 --- a/libavcodec/libkvazaar.c +++ b/libavcodec/libkvazaar.c @@ -221,9 +221,9 @@ static int libkvazaar_encode(AVCodecContext *avctx, frame->width / 2, 0 }; - av_image_copy(dst, dst_linesizes, - (const uint8_t **)frame->data, frame->linesize, - frame->format, frame->width, frame->height); + av_image_copy2(dst, dst_linesizes, + frame->data, frame->linesize, + frame->format, frame->width, frame->height); } input_pic->pts = frame->pts; diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c index af53219b41..7d650ae03e 100644 --- a/libavcodec/libopenh264dec.c +++ b/libavcodec/libopenh264dec.c @@ -141,7 +141,8 @@ static int svc_decode_frame(AVCodecContext *avctx, AVFrame *avframe, linesize[0] = info.UsrData.sSystemBuffer.iStride[0]; linesize[1] = linesize[2] = info.UsrData.sSystemBuffer.iStride[1]; linesize[3] = 0; - av_image_copy(avframe->data, avframe->linesize, (const uint8_t **) ptrs, linesize, avctx->pix_fmt, avctx->width, avctx->height); + av_image_copy2(avframe->data, avframe->linesize, ptrs, linesize, + avctx->pix_fmt, avctx->width, avctx->height); avframe->pts = info.uiOutYuvTimeStamp; avframe->pkt_dts = AV_NOPTS_VALUE; diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c index 40c8caf887..72ef5fa9a7 100644 --- a/libavcodec/libvpxdec.c +++ b/libavcodec/libvpxdec.c @@ -329,8 +329,8 @@ static int vpx_decode(AVCodecContext *avctx, AVFrame *picture, } else { if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) return ret; - av_image_copy(picture->data, picture->linesize, (const uint8_t**)planes, - linesizes, avctx->pix_fmt, img->d_w, img->d_h); + av_image_copy2(picture->data, picture->linesize, planes, + linesizes, avctx->pix_fmt, img->d_w, img->d_h); } *got_frame = 1; } diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 485ab7b4ed..a1ae5d5ec5 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -428,9 +428,6 @@ static void copy_frame_to_buffer(AVCodecContext *avctx, const AVFrame *frame, ui MediaCodecEncContext *s = avctx->priv_data; uint8_t *dst_data[4] = {}; int dst_linesize[4] = {}; - const uint8_t *src_data[4] = { - frame->data[0], frame->data[1], frame->data[2], frame->data[3] - }; if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) { dst_data[0] = dst; @@ -449,8 +446,8 @@ static void copy_frame_to_buffer(AVCodecContext *avctx, const AVFrame *frame, ui av_assert0(0); } - av_image_copy(dst_data, dst_linesize, src_data, frame->linesize, - avctx->pix_fmt, avctx->width, avctx->height); + av_image_copy2(dst_data, dst_linesize, frame->data, frame->linesize, + avctx->pix_fmt, avctx->width, avctx->height); } static int mediacodec_send(AVCodecContext *avctx, diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 8d67d10cd9..4bb3eb22ef 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -648,8 +648,8 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame, av_image_fill_arrays(src, linesize, buffer->data + buffer->type->video.offset[0], avctx->pix_fmt, w, h, 1); - av_image_copy(frame->data, frame->linesize, (const uint8_t **)src, linesize, - avctx->pix_fmt, avctx->width, avctx->height); + av_image_copy2(frame->data, frame->linesize, src, linesize, + avctx->pix_fmt, avctx->width, avctx->height); } frame->sample_aspect_ratio = avctx->sample_aspect_ratio; diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 82048e9326..1dda770c97 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -56,8 +56,8 @@ static void copy_frame(AVFrame *f, const uint8_t *src, int width, int height) int src_linesize[4]; av_image_fill_arrays(src_data, src_linesize, src, f->format, width, height, 1); - av_image_copy(f->data, f->linesize, (const uint8_t **)src_data, src_linesize, - f->format, width, height); + av_image_copy2(f->data, f->linesize, src_data, src_linesize, + f->format, width, height); } /** diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 9875f02dc8..65b96d6cf6 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -2008,9 +2008,9 @@ static int nvenc_copy_frame(AVCodecContext *avctx, NvencSurface *nv_surface, if (frame->format == AV_PIX_FMT_YUV420P) FFSWAP(uint8_t*, dst_data[1], dst_data[2]); - av_image_copy(dst_data, dst_linesize, - (const uint8_t**)frame->data, frame->linesize, frame->format, - avctx->width, avctx->height); + av_image_copy2(dst_data, dst_linesize, + frame->data, frame->linesize, frame->format, + avctx->width, avctx->height); return 0; } diff --git a/libavcodec/omx.c b/libavcodec/omx.c index 8d6519d141..82fd492071 100644 --- a/libavcodec/omx.c +++ b/libavcodec/omx.c @@ -793,7 +793,8 @@ static int omx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, need_copy = 1; } if (need_copy) - av_image_copy(dst, linesize, (const uint8_t**) frame->data, frame->linesize, avctx->pix_fmt, avctx->width, avctx->height); + av_image_copy2(dst, linesize, frame->data, frame->linesize, + avctx->pix_fmt, avctx->width, avctx->height); buffer->nFlags = OMX_BUFFERFLAG_ENDOFFRAME; buffer->nOffset = 0; // Convert the timestamps to microseconds; some encoders can ignore diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 04bcc612b7..d80fb4e7c6 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -201,7 +201,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if (ret < 0) return ret; decode_row((const uint32_t *)psrc, (uint16_t *)pointers[0], (uint16_t *)pointers[1], (uint16_t *)pointers[2], avctx->width * avctx->height, s->unpack_frame); - av_image_copy(pic->data, pic->linesize, (const uint8_t **)pointers, linesizes, avctx->pix_fmt, avctx->width, avctx->height); + av_image_copy2(pic->data, pic->linesize, pointers, linesizes, + avctx->pix_fmt, avctx->width, avctx->height); av_freep(&pointers[0]); } diff --git a/libavdevice/xv.c b/libavdevice/xv.c index b3d79d57a8..cba933ef17 100644 --- a/libavdevice/xv.c +++ b/libavdevice/xv.c @@ -315,8 +315,8 @@ static int write_picture(AVFormatContext *s, uint8_t *input_data[4], } } - av_image_copy(data, img->pitches, (const uint8_t **)input_data, linesize, - xv->image_format, img->width, img->height); + av_image_copy2(data, img->pitches, input_data, linesize, + xv->image_format, img->width, img->height); return xv_repaint(s); } diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index 9aa781ef7b..6130f21e7f 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -117,7 +117,8 @@ int ff_load_image(uint8_t *data[4], int linesize[4], goto end; ret = 0; - av_image_copy(data, linesize, (const uint8_t **)frame->data, frame->linesize, *pix_fmt, *w, *h); + av_image_copy2(data, linesize, frame->data, frame->linesize, + *pix_fmt, *w, *h); end: avcodec_free_context(&codec_ctx); diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index 8693ad6488..cbfcf1e036 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -234,22 +234,18 @@ static void horizontal_frame_pack(AVFilterLink *outlink, } else { for (i = 0; i < 2; i++) { const int psize = 1 + (s->depth > 8); - const uint8_t *src[4]; uint8_t *dst[4]; int sub_w = psize * s->input_views[i]->width >> s->pix_desc->log2_chroma_w; - src[0] = s->input_views[i]->data[0]; - src[1] = s->input_views[i]->data[1]; - src[2] = s->input_views[i]->data[2]; - dst[0] = out->data[0] + i * s->input_views[i]->width * psize; dst[1] = out->data[1] + i * sub_w; dst[2] = out->data[2] + i * sub_w; - av_image_copy(dst, out->linesize, src, s->input_views[i]->linesize, - s->input_views[i]->format, - s->input_views[i]->width, - s->input_views[i]->height); + av_image_copy2(dst, out->linesize, + s->input_views[i]->data, s->input_views[i]->linesize, + s->input_views[i]->format, + s->input_views[i]->width, + s->input_views[i]->height); } } } @@ -263,15 +259,10 @@ static void vertical_frame_pack(AVFilterLink *outlink, int i; for (i = 0; i < 2; i++) { - const uint8_t *src[4]; uint8_t *dst[4]; int linesizes[4]; int sub_h = s->input_views[i]->height >> s->pix_desc->log2_chroma_h; - src[0] = s->input_views[i]->data[0]; - src[1] = s->input_views[i]->data[1]; - src[2] = s->input_views[i]->data[2]; - dst[0] = out->data[0] + i * out->linesize[0] * (interleaved + s->input_views[i]->height * (1 - interleaved)); dst[1] = out->data[1] + i * out->linesize[1] * @@ -286,10 +277,11 @@ static void vertical_frame_pack(AVFilterLink *outlink, linesizes[2] = out->linesize[2] + interleaved * out->linesize[2]; - av_image_copy(dst, linesizes, src, s->input_views[i]->linesize, - s->input_views[i]->format, - s->input_views[i]->width, - s->input_views[i]->height); + av_image_copy2(dst, linesizes, + s->input_views[i]->data, s->input_views[i]->linesize, + s->input_views[i]->format, + s->input_views[i]->width, + s->input_views[i]->height); } } diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index 7245684085..14beb972c5 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -666,9 +666,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) goto end; } - av_image_copy(b->planes, s->planewidth, - (const uint8_t**)in->data, in->linesize, - inlink->format, inlink->w, inlink->h); + av_image_copy2(b->planes, s->planewidth, + in->data, in->linesize, + inlink->format, inlink->w, inlink->h); p = (in->flags & AV_FRAME_FLAG_INTERLACED) ? !(in->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) : 0; @@ -714,9 +714,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) } av_frame_copy_props(out, in); - av_image_copy(out->data, out->linesize, - (const uint8_t**)f->buffer->planes, s->planewidth, - inlink->format, inlink->w, inlink->h); + av_image_copy2(out->data, out->linesize, + f->buffer->planes, s->planewidth, + inlink->format, inlink->w, inlink->h); ret = ff_filter_frame(outlink, out); pullup_release_frame(f); diff --git a/libavfilter/yadif_common.c b/libavfilter/yadif_common.c index 561659e346..b26989f574 100644 --- a/libavfilter/yadif_common.c +++ b/libavfilter/yadif_common.c @@ -89,9 +89,9 @@ static void fixstride(AVFilterLink *link, AVFrame *f) if(!dst) return; av_frame_copy_props(dst, f); - av_image_copy(dst->data, dst->linesize, - (const uint8_t **)f->data, f->linesize, - dst->format, dst->width, dst->height); + av_image_copy2(dst->data, dst->linesize, + f->data, f->linesize, + dst->format, dst->width, dst->height); av_frame_unref(f); av_frame_move_ref(f, dst); av_frame_free(&dst); diff --git a/libavutil/frame.c b/libavutil/frame.c index b6cee2d886..a3f07ca089 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -833,7 +833,6 @@ AVFrameSideData *av_frame_get_side_data(const AVFrame *frame, static int frame_copy_video(AVFrame *dst, const AVFrame *src) { - const uint8_t *src_data[4]; int planes; if (dst->width < src->width || @@ -848,10 +847,9 @@ static int frame_copy_video(AVFrame *dst, const AVFrame *src) if (!dst->data[i] || !src->data[i]) return AVERROR(EINVAL); - memcpy(src_data, src->data, sizeof(src_data)); - av_image_copy(dst->data, dst->linesize, - src_data, src->linesize, - dst->format, src->width, src->height); + av_image_copy2(dst->data, dst->linesize, + src->data, src->linesize, + dst->format, src->width, src->height); return 0; } diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index aa50538d64..cc8c97d2b6 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -452,8 +452,8 @@ static int d3d11va_transfer_data(AVHWFramesContext *ctx, AVFrame *dst, fill_texture_ptrs(map_data, map_linesize, ctx, &desc, &map); - av_image_copy(dst->data, dst->linesize, (const uint8_t **)map_data, map_linesize, - ctx->sw_format, w, h); + av_image_copy2(dst->data, dst->linesize, map_data, map_linesize, + ctx->sw_format, w, h); ID3D11DeviceContext_Unmap(device_hwctx->device_context, staging, 0); } else { @@ -464,8 +464,8 @@ static int d3d11va_transfer_data(AVHWFramesContext *ctx, AVFrame *dst, fill_texture_ptrs(map_data, map_linesize, ctx, &desc, &map); - av_image_copy(map_data, map_linesize, (const uint8_t **)src->data, src->linesize, - ctx->sw_format, w, h); + av_image_copy2(map_data, map_linesize, src->data, src->linesize, + ctx->sw_format, w, h); ID3D11DeviceContext_Unmap(device_hwctx->device_context, staging, 0); diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c index ea378df720..2c11f151ff 100644 --- a/libavutil/hwcontext_dxva2.c +++ b/libavutil/hwcontext_dxva2.c @@ -356,8 +356,8 @@ static int dxva2_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst, if (ret < 0) goto fail; - av_image_copy(map->data, map->linesize, (const uint8_t **)src->data, src->linesize, - ctx->sw_format, src->width, src->height); + av_image_copy2(map->data, map->linesize, src->data, src->linesize, + ctx->sw_format, src->width, src->height); fail: av_frame_free(&map); diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h index 91312a72d3..c7fc330117 100644 --- a/libavutil/imgutils.h +++ b/libavutil/imgutils.h @@ -174,6 +174,22 @@ void av_image_copy(uint8_t * const dst_data[4], const int dst_linesizes[4], const uint8_t * const src_data[4], const int src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height); +/** + * Wrapper around av_image_copy() to workaround the limitation + * that the conversion from uint8_t * const * to const uint8_t * const * + * is not performed automatically in C. + * @see av_image_copy + */ +static inline +void av_image_copy2(uint8_t * const dst_data[4], const int dst_linesizes[4], + uint8_t * const src_data[4], const int src_linesizes[4], + enum AVPixelFormat pix_fmt, int width, int height) +{ + av_image_copy(dst_data, dst_linesizes, + (const uint8_t * const *)src_data, src_linesizes, + pix_fmt, width, height); +} + /** * Copy image data located in uncacheable (e.g. GPU mapped) memory. Where * available, this function will use special functionality for reading from such From patchwork Thu Sep 7 01:05:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43629 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp298339pzh; Wed, 6 Sep 2023 18:08:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IED6uYcKewhZxG6srso4/G6ZJ+/NH3WFYjE2fQVskqBXCEqTiKWpe4nz60O5uxnEuuyszVP X-Received: by 2002:a05:6512:4020:b0:4fd:d92e:31ca with SMTP id br32-20020a056512402000b004fdd92e31camr4313425lfb.36.1694048890820; Wed, 06 Sep 2023 18:08:10 -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 k25-20020aa7d8d9000000b00523cb27ebdesi10275965eds.237.2023.09.06.18.08.02; Wed, 06 Sep 2023 18:08:10 -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=esGlYyEh; 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 C614168C8DA; Thu, 7 Sep 2023 04:06:21 +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-vi1eur04olkn2052.outbound.protection.outlook.com [40.92.75.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4887168C8C9 for ; Thu, 7 Sep 2023 04:06:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ox73NffjSSGg2In078brfejrKkSBoKgg4mcdLViM0mxNoh80Szs1PccxTkh8DlMEFEINlco/J4na9wzrMU2SwCq1n0m9deqcUDT0hDJMq+es+X+HDrQxHi7Cti/Z71sKfQ65QAgcMHuHv7RNtT/PzIpfQFdCWiwcTVPKvWdgkxvW37KqdkQtfxTy/gtdC04mJ0Zn3/oW9JtUTGMqY/E1oKPG43jAeK0NHyETLCDqx803+6FMrwrzu74tQdEyiHpmH6wEvg7Xs9kAlZjWR4ypnOHxlhnUpG7jS2wGtnqouO4STtTpXfQMtnN6B3P8zOytsqPe7PAsO9HaX3edi0cfJA== 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=S7uuW4Zei7skhjGnO01OLOYuL1WQPBT+a+6cklwecS8=; b=O6+Me6PJlkfkPSyTNdpn2X+X/2i7OWaGo2DxAwLugmSzEgihhj9gsKjevSs+c90DytbKVizERPsLq08rkedsuN9k8QaIJemlXZqoLRUEQcPAq9yTZ4UC5TpGQgOAh58dRYWsL2JJuxOhAVdoRowziyLkIBVFc3ygBvoQZDFApiW38xmGW4O1cMuhNflZzZM/mquVcFIkJtOx+7Ga+Y22mlvSjk1Y7xVN4LACFBcN29akyywl0h75Zo/rZqN8qKjvquDiSmu0mblwDHLRd3tidM/E7JI5UJ7wwurkQwBLfT/sarlh1lXFsGNl/OpBiUUX8dZ3ncabeKiX6cJeJEEp1g== 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=S7uuW4Zei7skhjGnO01OLOYuL1WQPBT+a+6cklwecS8=; b=esGlYyEhn/sgP97QJYPTO0D57craAHfwPnn2UAG7GvMSigSpXv3OJ+evQolV0oL3f0GfMrhVHysQ0kGSxx44pK/msozdLwnxMPcW3WfOLbR75KvtSDtMAThf3wi8CBx78Qnch/c0ihB+bSaDy8KxmagUg68C7Obd+U5N9+TxGz/ZKESGag4hYzNYIhaHWIAW3mHFc8FLU3AFGGmTDvJYSSv45KSoxcvHOL575X5rN4LqK0CCG0GM2zYfRzjvtDxfzdV85X41y4WOubKzh67cAre/YspruaZJIEtGVbUD22e2AeMrPFGJYMBjGa4hMSHFi5KsZIdUVyYInS7AGV+RHA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0336.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:06:18 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:06:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:38 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [nrTT9RqL02DdOs7A5rbYvufHNAclkEMU] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-21-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0336:EE_ X-MS-Office365-Filtering-Correlation-Id: 284e79ef-b314-450d-fcd2-08dbaf3ea488 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zojW2oigbFhCDuMQuS2493LtKHgqZHInc55b7O2BWW0uXOq9Zvic5C6q4jbr2FBDHB0HC1nZm1iVYBgr7oIdlwitN81Fa73aSiDRTZ505LcIuDYF7XvfDSc63GkQVauJIVjMe3l2XV0SWAK7kYlqGcntvnpAL6l4oauhvTK5G+cvx+Jn0IH1goVm2tE3FNG68rxv3MoEsxuI2i0WUfp07WO0SYuQxD2z0BZ7MhIekVM4VkwFusq0Oa9eDRce5xdCW/TDaYWC60jKo4y6VpEMiBsp0+7kKGHwHT14LnFGBS0kxA2r3FLwpbkxSmGuv//KJJ3dX8t5CwQB7JUpVtb/F3+2+XhujvaM9mrwvJztaISkw1TXeS43UITVjQau9LFykB7iRaBfKTaevZcTfbk1I3AdhZjAWfOixKXVSRTe+8BLGGo8rcN8LgVcziTdO7pWGjgu9ptGuqpd0LGp3k6S2DIqr6YJqIiqm55CI75FXyWy8QOqH6P2SAZBWtaChqF/VHjjp8qB7ob0b72sR/tFr+HPyfJzdrUadQo05K4Qnzxo5Ewq4Kj5yUS7mEhcqBV69WUyFGeDlIDdjWzhG4pd+M699VCmAQiqf0oI21/HwV7d0DXXzw2B/06aO4gR9Hxo X-MS-Exchange-A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FSjsV8q6j1XHUXvUyzDa2mnW6swT0FuTBhCxg5eKnac7cYkNImdGV5/LohqRO/antCpyXimdICQPZBNZjeFsOlYE5B1fngbxCLhnNul11CjuYDGWHJiQ+VVxYlFlfn4h4+zc68XZDZ8ZDE5vCZ6veMdyrGULK82ecCiJQwx51URihiQxd4NDQEWU1i3+Ps4Jd+RNdXoqodEM99GjgBg07yGxLZ2F/tT+tu9Amo2Lgy+A1NYOwDm70Hr3 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 284e79ef-b314-450d-fcd2-08dbaf3ea488 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:06:18.8335 (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: DU2P250MB0336 Subject: [FFmpeg-devel] [PATCH v2 22/22] avfilter/vf_framepack: Use dedicated pointer for access 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: x5lR03VYEL9I Improves readability. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_framepack.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index cbfcf1e036..3b915ddddf 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -233,19 +233,20 @@ static void horizontal_frame_pack(AVFilterLink *outlink, } } else { for (i = 0; i < 2; i++) { + const AVFrame *const input_view = s->input_views[i]; const int psize = 1 + (s->depth > 8); uint8_t *dst[4]; - int sub_w = psize * s->input_views[i]->width >> s->pix_desc->log2_chroma_w; + int sub_w = psize * input_view->width >> s->pix_desc->log2_chroma_w; - dst[0] = out->data[0] + i * s->input_views[i]->width * psize; + dst[0] = out->data[0] + i * input_view->width * psize; dst[1] = out->data[1] + i * sub_w; dst[2] = out->data[2] + i * sub_w; av_image_copy2(dst, out->linesize, - s->input_views[i]->data, s->input_views[i]->linesize, - s->input_views[i]->format, - s->input_views[i]->width, - s->input_views[i]->height); + input_view->data, input_view->linesize, + input_view->format, + input_view->width, + input_view->height); } } } @@ -259,12 +260,13 @@ static void vertical_frame_pack(AVFilterLink *outlink, int i; for (i = 0; i < 2; i++) { + const AVFrame *const input_view = s->input_views[i]; uint8_t *dst[4]; int linesizes[4]; - int sub_h = s->input_views[i]->height >> s->pix_desc->log2_chroma_h; + int sub_h = input_view->height >> s->pix_desc->log2_chroma_h; dst[0] = out->data[0] + i * out->linesize[0] * - (interleaved + s->input_views[i]->height * (1 - interleaved)); + (interleaved + input_view->height * (1 - interleaved)); dst[1] = out->data[1] + i * out->linesize[1] * (interleaved + sub_h * (1 - interleaved)); dst[2] = out->data[2] + i * out->linesize[2] * @@ -278,10 +280,10 @@ static void vertical_frame_pack(AVFilterLink *outlink, interleaved * out->linesize[2]; av_image_copy2(dst, linesizes, - s->input_views[i]->data, s->input_views[i]->linesize, - s->input_views[i]->format, - s->input_views[i]->width, - s->input_views[i]->height); + input_view->data, input_view->linesize, + input_view->format, + input_view->width, + input_view->height); } } From patchwork Thu Sep 7 10:38:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43632 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp506112pzh; Thu, 7 Sep 2023 03:37:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2UI4zbmcsUAe/t5OiOgMrmAOjxxqLQBOTIbMS/hmfsgPi2DXgECMWuvqfBgo7dfZv3PR0 X-Received: by 2002:a17:906:318c:b0:992:3897:1985 with SMTP id 12-20020a170906318c00b0099238971985mr4691085ejy.43.1694083068717; Thu, 07 Sep 2023 03:37:48 -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 p23-20020a17090635d700b0099d969e2d30si11032311ejb.192.2023.09.07.03.37.46; Thu, 07 Sep 2023 03:37:48 -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=b7YNizrT; 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 16FD668C717; Thu, 7 Sep 2023 13:37:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03olkn2063.outbound.protection.outlook.com [40.92.58.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E182068C717 for ; Thu, 7 Sep 2023 13:37:35 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cHhlfP4XCOUuA2zG955eSzEAUK5NMAvXU7AheeY4Bja9O2Q/t2u8EiYFPf/5Rcywj4Wpv4xcL8S3V17uq2mcedtNrhfLeIenvD3bd9mOfFV9TgbeBocB36/02/x/N+W5yaxDPajTPzgKJDGi4mQxEIPF1LdJ4dwhQS7DNdEFeuDZJCFJ8OK6rr+LitpUAfv/xdVH3Avwh4GaRxjs3VidG5KtlwlwvmNOUQUBsIlGRb6Mc9OE5Ip8Koa3E/ZueBGoI22RQqb6tQQqFuau62wOXLNFxLv+XLHr91i2DL+oeO5+XWCvhvqivi5RTFNrrQyQaEkzd0/7uSt926T4kW2TOw== 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=yJXk2zih0KVz0C47QJ5lXjqCn7cUYx5a67actKHfMbg=; b=iQyWBmds6GbWerWHD2X9qvTY+cNkr3WDcwIfnQWaW8r1e+PvBW6DXwUh01bKuyNwm4tH3i8QMUG3ovP9kKmMrp6AKTBUAlLfX8R0KbyZDEUGuZLydazT+TqhW7j7q4xtnhC0Dr6uwXsMibhRZ9/wp9lrV9O7zHeJjioIX730PdVdt8M+X6wtIKAkkV7bwXDhsNxCOqdtb/ANfp9ubX2zkXZvGulFenoiZq8/C7+Ga04sZKw9/kcD2MFeiNvBaG7VEX1k7naUiBGsQ+ltqLxOamjVdlOXnEAG384c7tOqDLnLFIhBLdHrbcixuAlk7eK7Hbv2S7ir/0nRz5EdjMX26w== 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=yJXk2zih0KVz0C47QJ5lXjqCn7cUYx5a67actKHfMbg=; b=b7YNizrTHdEkhKY7mHJNVRTvq7jnqTkWXLrxFGqDjlYocdr+nX90CLOgXdSYizRtfgKgPT2O+LzlnzKGtuVPmC2T1dX8vzJJDa0BLNEwgjoVVllXcqgi69YkmtrigjZxPiAVnV1DNcZD/cxYiPSRrNjcpT2KymQVh5LbcdFRzk4YL0L/ULyBZeGWnSJjR9+pzZsperEYLXHHEw3xne+Oy2uPT3v8lC5vS/IjRLhnSmRUmNccLhRYC0eCmE0Axa7fpRKYKIloCIz1z8LKtgkbEU9LvY24u7nv16IR8aPMuq5201xkLcpCMNJIJiqKaUCUrvEbqIWsnmBlE2V1S6mjAQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0191.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:277::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 10:37:34 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 10:37:34 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 12:38:41 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [XgxY2oiGmsVurU8Ag6H8iXC7aVK6AXQL] X-ClientProxiedBy: VI1PR06CA0127.eurprd06.prod.outlook.com (2603:10a6:803:a0::20) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907103844.673303-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0191:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d3be7d1-e730-4785-f2bb-08dbaf8e721a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hx8Zr3WznUVJcusM8AijyERDIlscyovzX2r9AKcFL4nKejXU2PKs58GyzVXRK1+YJoQefnLD2OTYLiuBwVptzkKTyhSumC4dus5pA/38MgXzqlaGU/sZPitbtrrP0DkhKlsrS1pqyOR4shqBxSulRYTEnKnvtMy83UTQwAk6t2J21g5x6XZ4odwjkjRXuHzot//ceaCAr8gf0wiDNV1bUZl3eJOCMpL9Zip+zaZPjQNJwUKxusO5Gs1BVDF3Df1EFtPAykgCNMoJ+jDAiEaebWuTRtLT/sdZyUwGTDgaZXFqdm3WCwdI66eYhXAJetJQ+LXTk/sRMRmpa8RGOj1t36FCH4ihrdfdHHI6t6sL9FVQ7sQRzgTx3pd/ZneBzUcR5pnIPIA3gFqjubpgT7u17/3YweO7RkmQYvaMEfmyn2QwbVRpuhwpQymYfNgWi71P/CTXcwORfzwQ3ZUdL8sfMgs01xX6fS2btxSFrEVCt+bCmyCXdAQ0PkVHu3luMoCdxv6GDPoqaGg80xjf20wA4/EyZIU/eVZB9qdZQkJzy9/Qwy67NqIToj4zTaRmt8gAOE8kVhWSakehQQzthOYV5vu6KVO0gruk0JkXSE1PnLvZ4HpGNAv+cqwsBjuSuwfF X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xV3uSG8ZIUj3SSOqQsD3Po437XchdtJoecarAvn6lJCFAjRaxF/enS0wq139bUvEVOOFTcm9F8k3BKpvaFj7un8eySHyNevTOSKNU1WL4ORRK7cWFj7qv817iWkZpViZyhXnp0yNWwTX7m5FfvqNk65sVPypZKaz0S4ccwtaJCMUvX23Aa75yAYtgOdo1VTrvgV5Tto0pFyemFFoXal1Hmoihu4bwd1s1wU5CfTxYIepYoXgOIIFUFXMrCWPmQn96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3be7d1-e730-4785-f2bb-08dbaf8e721a X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 10:37:34.0854 (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: DU2P250MB0191 Subject: [FFmpeg-devel] [PATCH 23/26] avformat/avio: Remove duplicated freeing code 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: 2QHvqM7vLdkw The target of the jump frees this stuff, too. Signed-off-by: Andreas Rheinhardt --- libavformat/avio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index 053cb2e05a..a4572d2f05 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -136,8 +136,6 @@ static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up, } if(ret<0 || p!=key){ av_log(uc, AV_LOG_ERROR, "Error parsing options string %s\n", start); - av_freep(&uc->priv_data); - av_freep(&uc); err = AVERROR(EINVAL); goto fail; } From patchwork Thu Sep 7 10:38:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43635 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp506346pzh; Thu, 7 Sep 2023 03:38:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+dcQsSdP+B9NHZr9YmQHoyhwl160hNHHWBMLNBXGR6cFZ+cZsCtkDY+nDy8ohLnjTuU4X X-Received: by 2002:aa7:cd13:0:b0:523:4996:a4f9 with SMTP id b19-20020aa7cd13000000b005234996a4f9mr4690310edw.34.1694083101136; Thu, 07 Sep 2023 03:38: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 z5-20020aa7c645000000b00529fa153875si10710244edr.481.2023.09.07.03.37.58; Thu, 07 Sep 2023 03:38: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=eMCq+rvO; 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 54AF168C83C; Thu, 7 Sep 2023 13:37:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03olkn2063.outbound.protection.outlook.com [40.92.58.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A3BD68C82C for ; Thu, 7 Sep 2023 13:37:41 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z9i5cYIBrtL+qAz2HLt5qfg5Hze9/8s9Q5dDHzv8MMJ7j/wDKef0LZOUHDkloO75Qdned5mm4K4GCcKB2qUmUOIHjeCI+rEh1gALI50KEAitMsdjgQefUqt7BM8bkjgyHg6MgXkYHtwNeNejP5jQhkbzoxBkHmmva0VjVgzLAVQemJiaR5jMY9AvhDRW6MKz/YTWW//4LdglRNechYrhTBcZ0PszpcZfNCbP7M59rub0PFtvK/ZTfSxnkrWKjye4xkK1oUEZCCgyxhk5vcA8Tr1T2IavkBp64xeMMdbzS+KNp14kCjoDrWbcQbR925Zl3KIxUfxnRlB0iaG1ccVNyg== 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=2Dl9hylCtShpc0C4S+BtAoq0FlnFPmPfQBgWYHhXruA=; b=h6fHcrwhQ7Ro8x1REdPMRl0XAbZwSKHi/Z9jfrR6ffGsFufKF1sJMLJFIDf+zAOiIQmRk3ijhHnHeRuUCTg+pRWj3S9vo2V2XvfSdCQLFvgyHkR+U3nN7lQdBKI8vsCn19zdTpSN7rbwK0FDp0vBgNUaYO2+lJcEvK04MNMhKQVHRmaKeWAIQ0UyQi/+zwhOPt6aUquLr0iSgnXqGoFn4ctvjkrj151JthmFqqno2XZ/uCcW7KhDxD0zigHqYO4T86FNx2TfcjcZaqlf8UexFT6knD0OlbEwCTuNUAa+ZURD5W/frH9K2BKVwIZ9aqD8wFwtNzPh7LMRz3cZx+iPww== 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=2Dl9hylCtShpc0C4S+BtAoq0FlnFPmPfQBgWYHhXruA=; b=eMCq+rvO784jgyW7b5nuMJdFtVnSuz1pJsxK5d1Mhgv5Zt03HrPG/fqHCxyrpSS4fdxn5jCBBsCzW3D3lCIv7JmnMgTReReAMHH+6Uev0bd0aFc3d+1sY+ptN6dGi51N/puZ2wACFNO9RSnhqFH0Owzm09PumKRBO/x30Vaukk5zE4kAWkEIrTA/lmuCvyS5KpPitUDQnUqb13QGw2Ep9+rKBTDa3xFemerFGlz3iHMybdE51L5ZWYl+tcXAkFbfhgQPH0TBOERvYm7W7MF5b3QrTUIasi0mWF6qrWXUk8aYJ1h3pQ7pV/GI4+b6y55Lte9DIGE4VfFOD6U/3SD1Nw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0191.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:277::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 10:37:36 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 10:37:35 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 12:38:42 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Y68+fWLHAELL5nq9rl2ivc3ERVKG80+/] X-ClientProxiedBy: VI1PR06CA0127.eurprd06.prod.outlook.com (2603:10a6:803:a0::20) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907103844.673303-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0191:EE_ X-MS-Office365-Filtering-Correlation-Id: ebe8a86c-7804-4f1e-884e-08dbaf8e7342 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AJUoI4RfOhBIsTWvFEOcqa+O/VkM31ypbtqCu3iVBYqo715K0OhBtEtaJru7U0/DNibdSvbyw+5PXKUPG1/Fp6JXctMqRVNrKERvfwGgWNgt04yE2qlITfZF99Yfr+uc6BKvelFCIVUVdzcLIrKimFsbI+ruPD6yTzjR6JyGlTIBQ2dtL47KPEzeaV0UO9wM8milObbDeKyWRpgXNQxkbgpXjp253jFRzMyOjsPt7cM76VEU0guvMd49q9hvh01sOpXLPATQfxhVbjd/jRZ2lQ01Twk7+2qGBuoo+0tdwMM0TdMxJT8USqiS2UOhSU04evbUduLaOUxtFfVxHBMpCftJrr1LL/u96eEL485gziG+pnJ56OitAk5joWjLa98wI9d+XVa+/JHgbeKnbglVEFylvGmxsr3X+COjc0nCfjYB2t5bR+7ai/pRv3O7nb/2AV8ATmQ06bgrsWANZ40DsvDf1j9ac6tUv7fpgwjjk/DjtnVcoPq4XJXssnwGpaYYC4ihv0Ce34oGTjYoxmgABrF5vmiYdAOjre/Ih7dLC4cwpezr6UpCaTInNIGUAC7AOt+3KMhbgJKq261ZpBMkXKRc9DXwMFh8NZJgcLvbmw4l95u0sTPMq/OkyrAxUl5f X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JUOOaGPBFaCDbEt0CZu8NBsfSq2gX0SlKIenfWO9+q6wfvyCdtRb1zLiYHxcx0Jsz6nbOCDKPgJQk/3FhWINWZ5aar1xNQ6o9I3AwkNwVyS4x+B/us4F49UB63iDhrjmtHeoAY08u0o2uTBINCnCDzGhnp9mzVDqzYqI15q3PfD8o3ho38Yjwb9ELxMUWHLG+dp/Jt3m1q+w7WjEB2mdTAz3vbj2MxEtWj+S2Ezy5D9AoTUyoml5ev4nZ5o+o6YUNUTOnJoK54tq9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dbaf8e7342 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 10:37:35.9434 (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: DU2P250MB0191 Subject: [FFmpeg-devel] [PATCH 24/26] avformat/avio: Remove redundant checks 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: 8fC9UD427H7u Checking the return value of av_opt_set() is equivalent to the current checks. Signed-off-by: Andreas Rheinhardt --- libavformat/avio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index a4572d2f05..617c1c0ac0 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -125,10 +125,7 @@ static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up, while(ret >= 0 && (key= strchr(p, sep)) && ppriv_data, p, key+1, 0); + ret = av_opt_set(uc->priv_data, p, key+1, 0); if (ret == AVERROR_OPTION_NOT_FOUND) av_log(uc, AV_LOG_ERROR, "Key '%s' not found.\n", p); *val= *key= sep; From patchwork Thu Sep 7 10:38:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43633 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp506254pzh; Thu, 7 Sep 2023 03:38:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFc4YVSRORhvoLQFSuYn2HK0CU2WT6driw7tq+KjP5ttomJOBnPizxK2DdvvDyBQoAspY/1 X-Received: by 2002:a17:907:7849:b0:9a0:9558:82a3 with SMTP id lb9-20020a170907784900b009a0955882a3mr4474914ejc.58.1694083089105; Thu, 07 Sep 2023 03:38:09 -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 g12-20020a1709063b0c00b009a19698e288si10624980ejf.543.2023.09.07.03.38.08; Thu, 07 Sep 2023 03:38:09 -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=P4dHXU2N; 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 8153468C867; Thu, 7 Sep 2023 13:37:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03olkn2063.outbound.protection.outlook.com [40.92.58.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 26EAF68C84F for ; Thu, 7 Sep 2023 13:37:46 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=US6DKNwb50HW6S0V633LGIyy5+Gf+d+UqqYUXqnncp7unFGhXNswuN9/yRj4ksfzvMYgT8S5BOPTXjWM9OxhbEott3zCjdfLR/Ob/jmNMWpQWOEcqzJgSggiqFDyrnoj/fKlL3JMHJuOG9Fg11cLD5YC9ng0WFEZ+9dCiucPDkVc2EmSdoCZYJ2bEBpuOqXCwCEiHIFJBTqlKRL8adYy9xXy/8JFxvcUQUQVQClqFPT4+q6Jx2IZbhGjS/qN+QZ6P6N5iYoDbZaRwxw1sf7rullCG3zOFqi1tt8bkmyItGQtCln9MSZnEGLBAWXzmOqFJ7FRIEUUzJME/eY2COSX2w== 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=yIOm1j+RA6noqD9MUigjxfjT2TJxDuzIbLOcnHqlUtQ=; b=NUuN/N0qes3zJFZzwPThT71mTjPbCt6kzsjg6EHR47SgaKOWubT3sBmxrcQTvRAmRjMKTR1JPArMxJ00JnIIA7RHuK4OGTJdGPUnHTzdnAuXq2jj0BF9jeS2LEul+Ty+qx0UIv2ABUo+2mu5k6KP9cMa2OV9zT2aiLGT29ETIGOYI4tA6OoCwazGfZfslJk50JbgS+vbINz3J1veTtbpP9DgmcSxA/LZzgbP9oiz/A5ESsP7h6yCSlt2sSAljciukoqv+Uz2DefctE7SpGai6yF4/QXvK+rvsMWLAPNvLIdHBraMkAe7GmDRtlqM72em1kc1s9denNT/pStg6KY38A== 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=yIOm1j+RA6noqD9MUigjxfjT2TJxDuzIbLOcnHqlUtQ=; b=P4dHXU2NNifPRbpxwgcXD5bFwtn6y8i3qA2+xBiZ51IvmTD5ostrh/bGYmuUnNR89HNmqTwJfkv40zxmqtZhjG5SDIvzHRGSGn4SZvQWJnkFPZjoiOwP3boSn/Ap4ouR8ZSIMjnkXrur24HtunRpB7OI39lzT/gZ7AZspJZJGcOZl99iFJoXq7Az07duL3oJFDcdKh7Gf6OBhQVhTy+ArhRWdcnp6oMq4qrfJz+CmqbCiqmmaccr0pM1GAfp6igeQU1iiiyXrGzqOt9jchhBVbuG3hRh2QcWcWKjeGXKvw7wEgF1axU3VtRMHD24MYNF0CgNOuWMYvqxrmjIIZ1NZA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0191.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:277::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 10:37:37 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 10:37:37 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 12:38:43 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [dmItIH7pMdh14s+NJRjU7KMgLTfs57O6] X-ClientProxiedBy: VI1PR06CA0127.eurprd06.prod.outlook.com (2603:10a6:803:a0::20) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907103844.673303-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0191:EE_ X-MS-Office365-Filtering-Correlation-Id: c96a7f55-c2f3-4d8b-9abe-08dbaf8e7422 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dkmLP7PnxY0SXqC7YsGYisVaUCYiSkIWm8FVveTfqUPSeVBRJ+eKZtaydDMO4guR9jq4l7q4wUePrsfYF3FyAj0vebJTVbTN2/btbSMzJ+scPqlLi/A4eaWHhKTesGiQ4CEUn4ajApzTa0tZv1/2xG6QMXzDX0sqIzH/yVuaJkJl6OEfnVU6ovePEI04Gh3ISxqZC7wzomikFTf749jnujy5mFDwW8lgrLpN/aqfXzLFLpbOWP11VeJhyfJj/eFUdN50cQKywwroAj22zcj8iCLNsa0UcjKfGWews8B3DLabZENGHPR8CRtZcJzSHsrqX96VFGnvHt8E9gGBVgmKLz+f0mFauRc2sOdyzpOovn0VnxS8TN7pjma7jKm9FTnM1EcQQXCgALnbjPCho7KG4Sq/ihOpj0rw5LfLSDwr2ckKW0NL5JaJ4/zAtEfPd26cWasDdbV7+SszYOl4+r/gh0afhGENBtGCpFEstUg2GpPeCgSwRxPsFgz8VlA+Qp0qkC/NCYwTAkEU8mVpaHGxngW8gd4LIPuFI4lU/DC2ZyHEf0AAbXoj04NRlWgqfu0jnJag6ZcM031zS3R6bWMmWFP2exfcEaRDAvXTpUjgnD4fhfvqv3aW+5YUxjOzjdjm X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LE/hVbjcWsLWnnDV+ia9zkP36llqEBGrASZkMcHtcx+V5C6YhNhFGvwbG0c4FL0NRIisyoIeWVBuySnpDR09UQkUZ/q7wx4sZMofLg6qZgj5nupV+UaCqTARY4FI5lDlg48CNZnE0JxqHOIkraEIklbypysGkjaqvdesxJ5688/5SzjCIEHZHEF5wByl2Mnxvx4d5SWRhiB6YLbZjt01S1dZZgFDQpUdkEjvXuutVF86J5V3dfTm4gG/cpe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96a7f55-c2f3-4d8b-9abe-08dbaf8e7422 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 10:37:37.4269 (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: DU2P250MB0191 Subject: [FFmpeg-devel] [PATCH 25/26] all: Use av_frame_replace() where appropriate 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: g3o+BnWGmuVk Signed-off-by: Andreas Rheinhardt --- libavcodec/agm.c | 3 +-- libavcodec/arbc.c | 3 +-- libavcodec/audiotoolboxenc.c | 3 +-- libavcodec/bink.c | 3 +-- libavcodec/cdgraphics.c | 3 +-- libavcodec/dxa.c | 3 +-- libavcodec/eacmv.c | 5 ++--- libavcodec/eamad.c | 3 +-- libavcodec/eatgv.c | 3 +-- libavcodec/escape124.c | 3 +-- libavcodec/gif.c | 3 +-- libavcodec/imm4.c | 3 +-- libavcodec/interplayvideo.c | 3 +-- libavcodec/mss2.c | 3 +-- libavcodec/mv30.c | 3 +-- libavcodec/mwsc.c | 3 +-- libavcodec/pdvdec.c | 3 +-- libavcodec/pngenc.c | 3 +-- libavcodec/qpeg.c | 3 +-- libavcodec/qsvenc.c | 3 +-- libavcodec/qtrleenc.c | 3 +-- libavcodec/smcenc.c | 3 +-- libavcodec/snowenc.c | 3 +-- libavcodec/svq1dec.c | 3 +-- libavcodec/vmdvideo.c | 3 +-- libavcodec/vp56.c | 6 ++---- libavcodec/xan.c | 3 +-- libavcodec/zerocodec.c | 3 +-- libavfilter/vf_paletteuse.c | 3 +-- libavfilter/vsrc_ddagrab.c | 3 +-- libavutil/hwcontext.c | 6 ++---- 31 files changed, 34 insertions(+), 67 deletions(-) diff --git a/libavcodec/agm.c b/libavcodec/agm.c index 55cf0b47c8..84c96d22b5 100644 --- a/libavcodec/agm.c +++ b/libavcodec/agm.c @@ -1203,8 +1203,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (ret < 0) return ret; - av_frame_unref(s->prev_frame); - if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) + if ((ret = av_frame_replace(s->prev_frame, frame)) < 0) return ret; frame->crop_top = avctx->coded_height - avctx->height; diff --git a/libavcodec/arbc.c b/libavcodec/arbc.c index 1b349f4dd6..46b0275e9a 100644 --- a/libavcodec/arbc.c +++ b/libavcodec/arbc.c @@ -166,8 +166,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, prev_pixels -= fill_tile4(avctx, fill, frame); } - av_frame_unref(s->prev_frame); - if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) + if ((ret = av_frame_replace(s->prev_frame, frame)) < 0) return ret; frame->pict_type = prev_pixels <= 0 ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c index 1b4e2a6c43..42ab7ae6e4 100644 --- a/libavcodec/audiotoolboxenc.c +++ b/libavcodec/audiotoolboxenc.c @@ -483,8 +483,7 @@ static OSStatus ffat_encode_callback(AudioConverterRef converter, UInt32 *nb_pac if (*nb_packets > frame->nb_samples) *nb_packets = frame->nb_samples; - av_frame_unref(at->encoding_frame); - ret = av_frame_ref(at->encoding_frame, frame); + ret = av_frame_replace(at->encoding_frame, frame); if (ret < 0) { *nb_packets = 0; return ret; diff --git a/libavcodec/bink.c b/libavcodec/bink.c index 8d96dee705..9024c388f3 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -1300,8 +1300,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, emms_c(); if (c->version > 'b') { - av_frame_unref(c->last); - if ((ret = av_frame_ref(c->last, frame)) < 0) + if ((ret = av_frame_replace(c->last, frame)) < 0) return ret; } diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index 0c5022a5d6..7b0666a3e2 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -344,8 +344,7 @@ static int cdg_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; cdg_scroll(cc, cdg_data, frame, inst == CDG_INST_SCROLL_COPY); - av_frame_unref(cc->frame); - ret = av_frame_ref(cc->frame, frame); + ret = av_frame_replace(cc->frame, frame); if (ret < 0) return ret; break; diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c index d903b7ecd4..650502ad23 100644 --- a/libavcodec/dxa.c +++ b/libavcodec/dxa.c @@ -317,8 +317,7 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR_INVALIDDATA; } - av_frame_unref(c->prev); - if ((ret = av_frame_ref(c->prev, frame)) < 0) + if ((ret = av_frame_replace(c->prev, frame)) < 0) return ret; *got_frame = 1; diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c index e73e310c4a..43dba20fae 100644 --- a/libavcodec/eacmv.c +++ b/libavcodec/eacmv.c @@ -210,9 +210,8 @@ static int cmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, cmv_decode_intra(s, frame, buf+2, buf_end); } - av_frame_unref(s->last2_frame); - av_frame_move_ref(s->last2_frame, s->last_frame); - if ((ret = av_frame_ref(s->last_frame, frame)) < 0) + FFSWAP(AVFrame*, s->last2_frame, s->last_frame); + if ((ret = av_frame_replace(s->last_frame, frame)) < 0) return ret; *got_frame = 1; diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 45012c62b8..287575e073 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -317,8 +317,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, *got_frame = 1; if (chunk_type != MADe_TAG) { - av_frame_unref(s->last_frame); - if ((ret = av_frame_ref(s->last_frame, frame)) < 0) + if ((ret = av_frame_replace(s->last_frame, frame)) < 0) return ret; } diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index a2aead46eb..35bd88b740 100644 --- a/libavcodec/eatgv.c +++ b/libavcodec/eatgv.c @@ -338,8 +338,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame, } } - av_frame_unref(s->last_frame); - if ((ret = av_frame_ref(s->last_frame, frame)) < 0) + if ((ret = av_frame_replace(s->last_frame, frame)) < 0) return ret; *got_frame = 1; diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c index 592de09a9f..cd62f8d1f0 100644 --- a/libavcodec/escape124.c +++ b/libavcodec/escape124.c @@ -362,8 +362,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame, "Escape sizes: %i, %i, %i\n", frame_size, buf_size, get_bits_count(&gb) / 8); - av_frame_unref(s->frame); - if ((ret = av_frame_ref(s->frame, frame)) < 0) + if ((ret = av_frame_replace(s->frame, frame)) < 0) return ret; *got_frame = 1; diff --git a/libavcodec/gif.c b/libavcodec/gif.c index 131af6198a..11add64468 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -503,8 +503,7 @@ static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } if (!s->image) { - av_frame_unref(s->last_frame); - ret = av_frame_ref(s->last_frame, pict); + ret = av_frame_replace(s->last_frame, pict); if (ret < 0) return ret; } diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c index b95ad86921..25e7570a2c 100644 --- a/libavcodec/imm4.c +++ b/libavcodec/imm4.c @@ -453,8 +453,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (ret < 0) return ret; - av_frame_unref(s->prev_frame); - if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) + if ((ret = av_frame_replace(s->prev_frame, frame)) < 0) return ret; } else { if (!s->prev_frame->data[0]) { diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index 1f0414bbaf..9c13707f87 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -1340,9 +1340,8 @@ FF_ENABLE_DEPRECATION_WARNINGS *got_frame = send_buffer; /* shuffle frames */ - av_frame_unref(s->second_last_frame); FFSWAP(AVFrame*, s->second_last_frame, s->last_frame); - if ((ret = av_frame_ref(s->last_frame, frame)) < 0) + if ((ret = av_frame_replace(s->last_frame, frame)) < 0) return ret; /* report that the buffer was completely consumed */ diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index 98103f7fed..94211ffc5e 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -797,8 +797,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame, av_log(avctx, AV_LOG_WARNING, "buffer not fully consumed\n"); if (c->mvX < 0 || c->mvY < 0) { - av_frame_unref(ctx->last_pic); - ret = av_frame_ref(ctx->last_pic, frame); + ret = av_frame_replace(ctx->last_pic, frame); if (ret < 0) return ret; } diff --git a/libavcodec/mv30.c b/libavcodec/mv30.c index c2d0547053..92c567c620 100644 --- a/libavcodec/mv30.c +++ b/libavcodec/mv30.c @@ -643,8 +643,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; } - av_frame_unref(s->prev_frame); - if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) + if ((ret = av_frame_replace(s->prev_frame, frame)) < 0) return ret; *got_frame = 1; diff --git a/libavcodec/mwsc.c b/libavcodec/mwsc.c index c7045ac793..f8c53c33ff 100644 --- a/libavcodec/mwsc.c +++ b/libavcodec/mwsc.c @@ -127,8 +127,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - av_frame_unref(s->prev_frame); - if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) + if ((ret = av_frame_replace(s->prev_frame, frame)) < 0) return ret; *got_frame = 1; diff --git a/libavcodec/pdvdec.c b/libavcodec/pdvdec.c index d50c4e729c..e2c03e7e0d 100644 --- a/libavcodec/pdvdec.c +++ b/libavcodec/pdvdec.c @@ -102,8 +102,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, dst += frame->linesize[0]; } - av_frame_unref(s->previous_frame); - if ((ret = av_frame_ref(s->previous_frame, frame)) < 0) + if ((ret = av_frame_replace(s->previous_frame, frame)) < 0) return ret; if (avpkt->flags & AV_PKT_FLAG_KEY) { diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index 21b033ea16..f0650962d2 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -1059,8 +1059,7 @@ static int encode_apng(AVCodecContext *avctx, AVPacket *pkt, } } - av_frame_unref(s->last_frame); - ret = av_frame_ref(s->last_frame, pict); + ret = av_frame_replace(s->last_frame, pict); if (ret < 0) return ret; diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index 1f76ebc5a1..9b4ad8e25d 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -307,8 +307,7 @@ FF_ENABLE_DEPRECATION_WARNINGS #endif memcpy(p->data[1], a->pal, AVPALETTE_SIZE); - av_frame_unref(ref); - if ((ret = av_frame_ref(ref, p)) < 0) + if ((ret = av_frame_replace(ref, p)) < 0) return ret; if (intra) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 4efc8d551e..a0144b0760 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1996,8 +1996,7 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame, return ret; } } else { - av_frame_unref(qf->frame); - ret = av_frame_ref(qf->frame, frame); + ret = av_frame_replace(qf->frame, frame); if (ret < 0) return ret; } diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c index 3846762745..92e6e84380 100644 --- a/libavcodec/qtrleenc.c +++ b/libavcodec/qtrleenc.c @@ -385,8 +385,7 @@ static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt, pkt->size = encode_frame(s, pict, pkt->data); /* save the current frame */ - av_frame_unref(s->previous_frame); - ret = av_frame_ref(s->previous_frame, pict); + ret = av_frame_replace(s->previous_frame, pict); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "cannot add reference\n"); return ret; diff --git a/libavcodec/smcenc.c b/libavcodec/smcenc.c index fb15489ad2..789aef4f77 100644 --- a/libavcodec/smcenc.c +++ b/libavcodec/smcenc.c @@ -566,8 +566,7 @@ static int smc_encode_frame(AVCodecContext *avctx, AVPacket *pkt, // write chunk length AV_WB24(pkt->data + 1, pkt->size); - av_frame_unref(s->prev_frame); - ret = av_frame_ref(s->prev_frame, frame); + ret = av_frame_replace(s->prev_frame, frame); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "cannot add reference\n"); return ret; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index c330303317..14a59ca67b 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1887,8 +1887,7 @@ redo_frame: (s->avctx->flags&AV_CODEC_FLAG_PSNR) ? SNOW_MAX_PLANES : 0, s->current_picture->pict_type); if (s->avctx->flags & AV_CODEC_FLAG_RECON_FRAME) { - av_frame_unref(avci->recon_frame); - av_frame_ref(avci->recon_frame, s->current_picture); + av_frame_replace(avci->recon_frame, s->current_picture); } pkt->size = ff_rac_terminate(c, 0); diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index c7269456e2..e3f22f108c 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -764,8 +764,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, AVFrame *cur, } if (!s->nonref) { - av_frame_unref(s->prev); - result = av_frame_ref(s->prev, cur); + result = av_frame_replace(s->prev, cur); if (result < 0) return result; } diff --git a/libavcodec/vmdvideo.c b/libavcodec/vmdvideo.c index 226ae0d316..2da8af31f5 100644 --- a/libavcodec/vmdvideo.c +++ b/libavcodec/vmdvideo.c @@ -454,8 +454,7 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, memcpy(frame->data[1], s->palette, PALETTE_COUNT * 4); /* shuffle frames */ - av_frame_unref(s->prev_frame); - if ((ret = av_frame_ref(s->prev_frame, frame)) < 0) + if ((ret = av_frame_replace(s->prev_frame, frame)) < 0) return ret; *got_frame = 1; diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index a5c5b23622..f2ee3fafd4 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -607,8 +607,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } if (avctx->pix_fmt == AV_PIX_FMT_YUVA420P) { - av_frame_unref(s->alpha_context->frames[VP56_FRAME_CURRENT]); - if ((ret = av_frame_ref(s->alpha_context->frames[VP56_FRAME_CURRENT], p)) < 0) { + if ((ret = av_frame_replace(s->alpha_context->frames[VP56_FRAME_CURRENT], p)) < 0) { av_frame_unref(p); if (res == VP56_SIZE_CHANGE) ff_set_dimensions(avctx, 0, 0); @@ -764,8 +763,7 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, next: if ((p->flags & AV_FRAME_FLAG_KEY) || s->golden_frame) { - av_frame_unref(s->frames[VP56_FRAME_GOLDEN]); - if ((res = av_frame_ref(s->frames[VP56_FRAME_GOLDEN], p)) < 0) + if ((res = av_frame_replace(s->frames[VP56_FRAME_GOLDEN], p)) < 0) return res; } diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 14fc2443c5..cc0ecea5eb 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -622,8 +622,7 @@ static int xan_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (xan_wc3_decode_frame(s, frame) < 0) return AVERROR_INVALIDDATA; - av_frame_unref(s->last_frame); - if ((ret = av_frame_ref(s->last_frame, frame)) < 0) + if ((ret = av_frame_replace(s->last_frame, frame)) < 0) return ret; *got_frame = 1; diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c index 6c3bcebce0..48f78d1d86 100644 --- a/libavcodec/zerocodec.c +++ b/libavcodec/zerocodec.c @@ -93,8 +93,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic, dst -= pic->linesize[0]; } - av_frame_unref(zc->previous_frame); - if ((ret = av_frame_ref(zc->previous_frame, pic)) < 0) + if ((ret = av_frame_replace(zc->previous_frame, pic)) < 0) return ret; *got_frame = 1; diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index 79d8fb2e51..bc767c508c 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_paletteuse.c @@ -781,9 +781,8 @@ static int apply_palette(AVFilterLink *inlink, AVFrame *in, AVFrame **outf) set_processing_window(s->diff_mode, s->last_in, in, s->last_out, out, &x, &y, &w, &h); - av_frame_unref(s->last_in); av_frame_unref(s->last_out); - if ((ret = av_frame_ref(s->last_in, in)) < 0 || + if ((ret = av_frame_replace(s->last_in, in)) < 0 || (ret = av_frame_ref(s->last_out, out)) < 0 || (ret = ff_inlink_make_frame_writable(inlink, &s->last_in)) < 0) { av_frame_free(&out); diff --git a/libavfilter/vsrc_ddagrab.c b/libavfilter/vsrc_ddagrab.c index c3107e11b4..2d9d71a7ba 100644 --- a/libavfilter/vsrc_ddagrab.c +++ b/libavfilter/vsrc_ddagrab.c @@ -1076,8 +1076,7 @@ static int ddagrab_request_frame(AVFilterLink *outlink) goto fail; } - av_frame_unref(dda->last_frame); - ret = av_frame_ref(dda->last_frame, frame); + ret = av_frame_replace(dda->last_frame, frame); if (ret < 0) return ret; diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 3396598269..3650d4653a 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -819,8 +819,7 @@ int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags) return AVERROR(EINVAL); } hwmap = (HWMapDescriptor*)src->buf[0]->data; - av_frame_unref(dst); - return av_frame_ref(dst, hwmap->source); + return av_frame_replace(dst, hwmap->source); } } @@ -950,6 +949,5 @@ fail: int ff_hwframe_map_replace(AVFrame *dst, const AVFrame *src) { HWMapDescriptor *hwmap = (HWMapDescriptor*)dst->buf[0]->data; - av_frame_unref(hwmap->source); - return av_frame_ref(hwmap->source, src); + return av_frame_replace(hwmap->source, src); } From patchwork Thu Sep 7 10:38:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43634 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp506337pzh; Thu, 7 Sep 2023 03:38:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUQDaraVef7V5NJ98u9e5nod7wVRzuWvEsfCTr58xP1mD08cOFYBfDSFJwgVUCtzM6DbJA X-Received: by 2002:a17:906:5a66:b0:9a1:d0bb:d215 with SMTP id my38-20020a1709065a6600b009a1d0bbd215mr4445843ejc.5.1694083099797; Thu, 07 Sep 2023 03:38:19 -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 gz5-20020a170906f2c500b00991f1a1c99csi10394735ejb.360.2023.09.07.03.38.17; Thu, 07 Sep 2023 03:38:19 -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=HEBHUQbh; 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 8DDB968C868; Thu, 7 Sep 2023 13:37:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03olkn2063.outbound.protection.outlook.com [40.92.58.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 44B3068C868 for ; Thu, 7 Sep 2023 13:37:51 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hd0EDuq+1gStugNHmsOvarEhjw6yxnISi7YLnS84DnEdLUoyk9JcaTkAHU3dlnT9qAWRc8K8z/ErjK+uEccFEXGW4T5DANv7G3v6H5Q45gqq99el7TDjnIfo9nLZuUu79sg0KRhxlmV+/fbcUqPJpeEmvZ21lXbOddydraPNKJBo03BHPEzOkcIQ5oped6xVNdw2hjZ3iypRpOHG2CM1sSeUl1AAwu45EkwzxTtpkawXOOYyg/Pjq6xM3/431/pMwa5NiyP+ksvMgSCqdBlYFj/SpCHg4oVMrGWuf7jQ4EJihq/RprRM1zD1z9m/loFYG/qra/VKim504tGxY6/kbQ== 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=tBOWf2jXvvLxb0T++5j1klVF1qOAZJnj58tZ3iuLz0s=; b=IrJWX+fuobsRtg2/bgkDIGWqA+THAgVQrYYw15yk1kenz6w2zGE3vG9ppraLJdwmlfwaO9L7wzkV1Iat2WVLRsACILfhj56/X7zUjeFzuTVo9/a6FP4imp0iZTcwJ5yVPuQ3iYerpVBw1o1fz66l27TYR26o4cT+Tt0JTTiIp8h+gufa73qWls85lUrGegE9CjQH0r3yy1GPW0MSa2x8mZzG6jADhPbAaQsI43xTCL66IGYaVGgAXHPiBrJOy/TL4L+pRhGgAMFkPcgZ0cnshWzEkNF7/WnHM4HKvgGVzG2CVROSb2gqb//mmv6SbUFtH3Y9OTh8578tMLxlCKZZ+w== 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=tBOWf2jXvvLxb0T++5j1klVF1qOAZJnj58tZ3iuLz0s=; b=HEBHUQbh0mR6GXC/1/eoDjIf8XNziDPQPgScPb9k+SiIEzD6WJ6+PYdT6mVkk2thfP6l1QHK40vfGhdNtexqdJSpeWPVrlr3AB95nPO4mtyKUZddiXu0Zi93r0CMy2v/icu+9hnu3yhEXqxaSZtX1trakLODLbPmYnq5dQCdy26uALy6dfWHVWOtIHMucBw861QHcEsxNVNaXOM6G0Xwf2VAiY69YX3EaK9Zmk1XYWqBkpfI/3dbKdbU7qWxJm0KC77pJW6ph0bxAGiAgaKdkIVvgU7GcwgjPJQ3SXqpnrZ5OgYmjv4YeUgxHnGBX460vtL7on0WfQkKrSK2YTGjfA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0191.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:277::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 10:37:38 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 10:37:38 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 12:38:44 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [h1oGjuq7kvJJ9X92ah5pCJw8pwV3p0LD] X-ClientProxiedBy: VI1PR06CA0127.eurprd06.prod.outlook.com (2603:10a6:803:a0::20) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907103844.673303-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0191:EE_ X-MS-Office365-Filtering-Correlation-Id: 8bfbfc4e-e4ab-4c05-9b51-08dbaf8e74ef X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3rdZpyEp3ZP+I+HfWsfMnHlk3NNk4p/kmDV4HghnhcCOPYU6rS7QPy+t+jQgvBHwUffziHNqyxRmU3yet+MD/5ejQQW6Ma16qDLr0svtnOOAwjV6PloCisbeAmm3+iPBN4F15FqqPphvSferjjnaoS6blSgwScijz6cMAmX/Uj1Q1UI/4frqh++hi6xmqDJYwkUgB7RUXXm6yHuLnwPueCjSnkQOHJLqYSOLb2uSeHNySvDKT3kLn+ZB5r3pIzFfxzcX6Rl4UyTixNTK75D7G8Y2B8jgq+zhwQ8UoZ4W9/Mw+AfVzqy8G7K7LqkHNSARHQoaG59Wlx+Z/fuTuooNZ1qnMwvbNgGR/eMXHauHEM5U97e2H5c8ZD8MZiNGkd6k6Dvuq6QTxBx2KVIuxGFjC136KUf1SLLWUUsQNtaA78j24xkr7bOyTy0kkPIr7iZOU9h3h+dd3b7VnmHaXXDKahbCzObp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Nz3UdJPSnq4ZUyHdNteGoDFGL7HrpUrFJX6/FEjslylgiN6QY4jfG+5fZRtZ1XVhpe39oZE8nIrPptTfRzefqiVRFO3szCGGVbyVZd4Glt54RANz6UcsRR1Ey3VEqXrqgKLDyz96hpmZ9Fr/GyDRk4tWRYhyTA87xyQtrKDWReEBqfvWYXBvpUTPR/swg4upxdJIgqZNq/JlFpRm9Npw/IjgUEPisqGeI1c6OguboRZO8J7Sv/A51PZH9sFdFu4HFqSEgrzyf2r90rl8ItnrZOmlBAEGxQPTicTsUYvhm95sATptscfPbNGH0S5LlCUpITDBxElWqFhP80hfrKaiNPxZMX0+09wudiFpDGC1/pTbXAdJKrpgEs+qAZZOK7cc8UaTH8oeQOOs5E0Anuxh9qGQtFw5+dk5a81naEF6atc8xfVm44zLII X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bfbfc4e-e4ab-4c05-9b51-08dbaf8e74ef X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 10:37:38.7620 (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: DU2P250MB0191 Subject: [FFmpeg-devel] [PATCH 26/26] avfilter/buffersrc: Use av_frame_clone() where appropriate 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: K8wZv4gigaFF Signed-off-by: Andreas Rheinhardt --- libavfilter/buffersrc.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index ea50713701..453fc0fd5c 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -230,17 +230,14 @@ FF_ENABLE_DEPRECATION_WARNINGS } - if (!(copy = av_frame_alloc())) - return AVERROR(ENOMEM); - if (refcounted && !(flags & AV_BUFFERSRC_FLAG_KEEP_REF)) { + if (!(copy = av_frame_alloc())) + return AVERROR(ENOMEM); av_frame_move_ref(copy, frame); } else { - ret = av_frame_ref(copy, frame); - if (ret < 0) { - av_frame_free(©); - return ret; - } + copy = av_frame_clone(frame); + if (!copy) + return AVERROR(ENOMEM); } #if FF_API_PKT_DURATION From patchwork Thu Sep 7 14:03:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43636 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp621704pzh; Thu, 7 Sep 2023 07:02:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGf6QjH8PF1ko+k2yH5U5DnWvsmC4bEmJLywmqJuPhb78hmB/IGqaH/UlrYDljU1J2Ly3Yk X-Received: by 2002:a17:906:8a54:b0:9a1:ffa7:d2da with SMTP id gx20-20020a1709068a5400b009a1ffa7d2damr4719546ejc.17.1694095349290; Thu, 07 Sep 2023 07:02:29 -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 v27-20020a17090606db00b00988c76f9d4bsi10229897ejb.347.2023.09.07.07.02.28; Thu, 07 Sep 2023 07:02:29 -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=tmGRbiLN; 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 C369168C843; Thu, 7 Sep 2023 17:02:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2028.outbound.protection.outlook.com [40.92.89.28]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7236E68C5D3 for ; Thu, 7 Sep 2023 17:02:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QM5lkMBpvfyP+1fAh15LfFSpZNu2nwnukB/eD1NouIK7dhuBwUwE2oezcSLNuW5OsmUr9JWkNa4LqtK2QkG9uh+prSIsiDsMh1DitTIo9YhaukxYBmfieXqd+L8Uo7KPmbRQ4fyz6BK76cvdPrHEwGslyVZRP7WmixSbrWnAiabmgCwMKOPBqgXHSMbCTWgrJXbwL2VB4R1KNGdiqneGfCPcv08FevNiu6zg9SIKV0aK/R2BvgBWoB993Xm7aX9Mgxgjr1AsYkep+L2pLDGd6yEcOfQAT2n+sPwKv5QSW6zgeKSQHq8j0iyMz2g1L5gtvkv08riSm/KpAcpryrF3XA== 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=XWF/yl3G4Sn728TVsQC/QfVDka/vgrSuoEZ8MMaUrps=; b=OhZCX1XAw/DHyWqqlo13Qoso7+XEbY8xxxGHQvaoSSxNxHDKkUH5nCWNYWccG6AB9h09Ia7VFgq8lzR0VEygEpBEORU54C5uhBECIMiC/lw5GW1+Ysxk6gvlewn02ToTs6/egZfOY/pmxusYe3Y3umVWQdOLrWEka594ZB8Jk/slj7gjVHdjpZ7Z1/XMM9hfbnrd7nBlFLWMaioewggterWNuCgQPHmacKBd4TcYNMYoRal8G4+ErR04Yw55rQ9rEmKcfJhtNnDPNehBwFQsez69WQG/gCd/PeTSwwEjRTFD8ZsJKuKep7cRVEmy4XgzsnQYAYy2W6259N5SsjQ5Ow== 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=XWF/yl3G4Sn728TVsQC/QfVDka/vgrSuoEZ8MMaUrps=; b=tmGRbiLNfrHHD8JFs+sCApffT/EydLn27ZmdM2yXIEGjwoq15E5zy59GOGkQSIAdVgATLUd2UQR5qMTdfHxy7QrZGEiv1x2DhajWPxGMNR5NLA9V2NxGoRx04rEgZNlg+QBa86ZIOmR8lV+0luKD3P/YnKOr1UwoXs4D1uiDp2NJLjdvAFPuscJPDfto6wcfnNEIw4znMq8LgizruEiq/N452RgSiQfkHPJktHbkKEbz2BYx39ZQBs3gbI8m6qtQ9lQYZGYLQOuNr1MtwGMfKy526Sl4H1y9EwSjwfg7qioo8QJX7sAuUdkaevWdbDHA/SfS4j+puke/MSzRPy+KfQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0077.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:23a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 14:02:15 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 14:02:13 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 16:03:18 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [F0SgMV+v1AFYPcpOWTUCXZHnuL1HIxO5] X-ClientProxiedBy: ZR0P278CA0035.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::22) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907140322.725171-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0077:EE_ X-MS-Office365-Filtering-Correlation-Id: 819297a8-6975-47d7-508b-08dbafab0848 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CrtV7WfQ83n4V2taE+NiOU4l2P8/OBgTY0SSKjTfgp7jKs4lBRGycUHaWdP66EW5MWmli+0v77Gsxqg/FLgxZmrzv6Myu2xbNsMRJCUQVXG1UiuofZUYCPP+fp9hHhuQrgvEU25X4QGe6KyK05Yl9MdZAN0tfjyh0xEoVuo6G1x54C67uBzlk7hOoxpyXQKAujMxMHqlZ291egcFnH8Nd1ItFZ0vT9G4K4tKrkYTuab863OzbTvCav1Kl1CNdoDH7G6PL9AV/AYpzD4O1tNM4dPFizz3P6OKRuzYIcL16ZYGrFKAo+ubH1Si3F8Q9iwbzDT1vZCNzaHCB+vbvbG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ihuTCjEDwYzZOMfzS6vxNWYJjrhfCuzWyTvU+JYnmXm0rjgNy2pOl4tWYS9rzx43CuyHLrN5XQCdzonQrOHFKPF5vXJ7FXs9uB+ZWdQIlWaIErRBQ3aK7zuD7GelywQYX1XNU5Iotq7BYbJmB1PEKXBlzNmwx+Nt2Bl9fNbrb4Kg/bydzpsYgRZ6wrmczP2A2EIgu9oXxAfv9JiNrDrPV+uhEB7DSX/kqLorWDGhG9M7tINOlNF92mFf/SnIE++JgjxjP3L+2vDE/gqP9+hEJce0JJuNZpVzfkOz1sIJ0YMDuJc3/q7AnedZ1wu7kZMZQJJe6ogeIvKE/xCZuWKch/SMDc/8+NLXiRAPFShDXjFA2RR9rOc/hQqOZkPwJiJHRDp4EUSoVL/p4o4IZBIBhk/4X2VL+rbyFDuzKrQQmPs+IWIk/Dmuf+Gqqc7Q50arA/jEELExTImHYxyHlSj1PK15KvVBXrkMQeop7cTlSNcMhwEZG1spMP17B9eWDZRHc9BH55+rFK07nHw9DlIeJtpSd+csztwIjXSMgBKApLpzn7Wua X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 819297a8-6975-47d7-508b-08dbafab0848 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 14:02:13.5329 (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: DU2P250MB0077 Subject: [FFmpeg-devel] [PATCH 27/31] avfilter/vf_vif: Don't cast const away unnecessarily 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: avoKHxD1ySjM Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_vif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c index 3c662491b2..a927abaf6f 100644 --- a/libavfilter/vf_vif.c +++ b/libavfilter/vf_vif.c @@ -301,8 +301,8 @@ static int compute_vif2(AVFilterContext *ctx, float *main_sq_filt = data_buf[11]; float *ref_main_filt = data_buf[12]; - float *curr_ref_scale = (float *)ref; - float *curr_main_scale = (float *)main; + const float *curr_ref_scale = ref; + const float *curr_main_scale = main; int curr_ref_stride = ref_stride; int curr_main_stride = main_stride; From patchwork Thu Sep 7 14:03:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43637 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp621885pzh; Thu, 7 Sep 2023 07:02:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTxh5P2h1MywuQ91y4VLyMxDIGzoxY2v9P9Z7wtzMOzlh/eC/TDCZCwkQMTrDxdEKwBXT1 X-Received: by 2002:a50:ee17:0:b0:528:90d7:a19 with SMTP id g23-20020a50ee17000000b0052890d70a19mr5599216eds.11.1694095361050; Thu, 07 Sep 2023 07:02:41 -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 v13-20020aa7d80d000000b0052c06fad1c4si11018447edq.474.2023.09.07.07.02.40; Thu, 07 Sep 2023 07:02:41 -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=T7zKcXIl; 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 E797868C85C; Thu, 7 Sep 2023 17:02:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2055.outbound.protection.outlook.com [40.92.89.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F3AD168C835 for ; Thu, 7 Sep 2023 17:02:23 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UsSw0z7voQzUsjXjzj0wGz4lstw8olystmSvlFUU930GEuuMBtg4S61GD1kwf5DfKMi24v+HLa5kZRCGfeJ1XLSHlA5qfK2r12uCBAJi6nKNd/Sd3LUUQ9XB7auheKAmqIDIlXl0IWevS/USC1rTrfWwmWdMMega7pQIXTK+cC/hm2knthX8nmRJ1lg71CAkjpWzOPBubWhfGh7KWrpPGaZZnly4sw2y2dA8ZOAMNRDULAIkDqI+8HKra9cU7OWuHgyZ0eyiCb46LWoZ4/AM2z/WLJSSwf0rQO+gPFLcASVjoSI6GVbw4YNpRKgx9aN4D0Wcd8cIh7BN0k0Z0l1xUg== 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=G/pAxZTPWto+wAGAPhnlCa8qZJgdabhLPw3ywW5m8ns=; b=kQDo2mIAk+nJI3IaBeKp0h2ykoUkU4rTtjJpUJthAY4UCmiR8sxfGfV6flS8N4YL4nOFmWLX5WlL4TnHGIEUKL2jSLJHbgSAELOm2m9PjlLE2rDDb1kZf9jTq4wjdHc3jRPnbDh5TdGk4ft5S9/m2aYDcHW7xjH+JYGd89hyzEjMlpX3RFKErxVlmo934FHmypBg9LslVSKeWQ1blf6VS6G+H2OnjnQ+D+RL+WoE7ishGBM02sKD9Bg9V4DgGo/kAR41VP44JLRhbNQBl5wHWDKYb/TnDJ7x95AVqSpwyhGnWA9MTcQuEgI6evSQ2omyd+xFtFGhMV2+s5D6yALxCQ== 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=G/pAxZTPWto+wAGAPhnlCa8qZJgdabhLPw3ywW5m8ns=; b=T7zKcXIlwLxjpxWb7vDEdyRCUuJiykFQ4DsyE0G2TVJxXKIncfh/YAh4ZWSojBj5cHkfJM6Mit7coF5uGE/OO87+SX41YUaBWaW9NqUPoisvF3l4oW20iRA2qf63XXlSvlfF9qRxXo7STQ+JR3y+wyv2bGaPbe7iDQTheBVrrK3qmfS+5okWnJZmKnxi+6V8qOo+Q47iDm3tM2cFbfkwzIlw0uhYFrr1VuYcHfjRDLb1v78Xw0lQtsBY37Hfa1n4JJCcQCE0DbQ54xFb4LjQo9KJ752R4EJaLDIdPmGC1YM650ysqrliBowgD2bNa0u7okwjiRpihcKar6v8+M4cPA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0077.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:23a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 14:02:22 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 14:02:22 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 16:03:19 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [ESvhu0wGOtV0SOwoZWBtbCI5ss4sTGND] X-ClientProxiedBy: ZR0P278CA0035.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::22) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907140322.725171-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0077:EE_ X-MS-Office365-Filtering-Correlation-Id: 58037366-ad77-40c3-1972-08dbafab0eb5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: txMmSew3apg2nFI6LxrYb+QxDNv2enM1xuDjtC/bQq2j0VaXJ5qfqtApEA9neZAuEtkhEBplydu4ZhsdTt3xv1qFGIWuDjHpHYWBeujXUE492oOn8Enhh3XBiBy1Yy/rQN2V1FvLtzlL2m76SkyAfcV7FHjz+MozeyRJKcWCEldCv9+xds92gUUwci65Ft7Hw+pTq9Qrjq9fMvsHlAMdYB6z58jPcnq9FjgkDQU6ydfuXJwp/71AFg/Ya/Ig4Fl+K+02wWvvg8aSGfiQaz7DnGjaF6TwnFpolU9KTyPs9MMkrEyBQdj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g9xOjSKG7K0R95JvpCbElgXoe/uotiQoThBTtGy3Iplp7vJulO5RDcxzpG78NHIbOZESe6odf7+IT93NprwCnKEuUYKDLaWErqIpkxc3QZTh97QfKeaEmUbKu6vb65A/iV5b9jIEXYuYS0zgMECNyWcAQDDVFiY4CQzaPI70gaHc8Ss7o+LMMxbHqeTVGtktpdUG3T0Y/ZG9r5qTZnMCSo+noqaeiAD3AMZNH/H5BcntkGW1Fk0R7hLB3EMPQGWGX5442flHhxBzV0Ov7Bv5Q++qzQ/NqW4PFitYLPh49sRoNmlO6tRjIDDkIMxVLfCGDVhARmvcJtT/1l7UETKtHp7YoE5e3L5o8RTczkQALR54QQXHyoLiw7B5Joyv4LB4h9uB2JZvafRg15TlHUaa4QnamvahpxgS4OFMCuhjQBu52anuiwColVagM2lk5kR7pI5egTpCs0tHdmRi+uPUJF8CpGWoQO6nBtWxIUVFybu9Kbb4H4MogxLURWuP3bIicZsCttvfFvoFrJv6b8cPDWE3gEJ68Yl8/Hqkpsq/6cfyytNZm1Wtp2q7TiebgE24eOJOVa9DEONj9Ih X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58037366-ad77-40c3-1972-08dbafab0eb5 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 14:02:22.6755 (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: DU2P250MB0077 Subject: [FFmpeg-devel] [PATCH 28/31] avfilter/vsrc_testsrc: Don't use const uint8_t* when pointee changes 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: yW+dDmGB+sFS The const makes no sense and is later cast away. Signed-off-by: Andreas Rheinhardt --- libavfilter/vsrc_testsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index d24481e6c4..5e41416464 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -327,7 +327,7 @@ static void haldclutsrc_fill_picture(AVFilterContext *ctx, AVFrame *frame) float scale; const int w = frame->width; const int h = frame->height; - const uint8_t *data = frame->data[0]; + uint8_t *data = frame->data[0]; const int linesize = frame->linesize[0]; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); const int depth = desc->comp[0].depth; From patchwork Thu Sep 7 14:03:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43638 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp622247pzh; Thu, 7 Sep 2023 07:03:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFcBoXTHbZIhkWbKwFpzfmw9HM6yOAmDQiTp9kMnzVDE08EsnfTg4+c4rFkMgNnccV4/Ax X-Received: by 2002:a17:906:cc12:b0:9a1:ea01:35b1 with SMTP id ml18-20020a170906cc1200b009a1ea0135b1mr4509140ejb.62.1694095384593; Thu, 07 Sep 2023 07:03:04 -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 q22-20020a1709060e5600b009a1bf6056dcsi11337999eji.783.2023.09.07.07.03.01; Thu, 07 Sep 2023 07:03:04 -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=gsaqTSJA; 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 47E6868C844; Thu, 7 Sep 2023 17:02:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2010.outbound.protection.outlook.com [40.92.90.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AA10768C844 for ; Thu, 7 Sep 2023 17:02:51 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ebz+DZ/nNm3Wxa8sT8GEx7+gltGQcw4wPROaIMUXuvAfxpa+24CV88HCal9z702fsyTWzYTQfeZyTcfDIRBpmTV8L7TpHZNmA3wFPU589KUyVojq9IFznh4oHY8SjjbLLRN8ahmpqlF/Etsvm6I9qO8I71uacsGj9mJMugAcos1LBM54SS5NNgX7+OOAcnjkgu9RgTXeRb4cgLZpkzlzapet+s3xj/XZCbFuiTFwFkx3ZLOajYbn0cmvZw31PauTlj8d5/H7963CJWkuZN9a8Bxer/sxasYGvA6Apf72zXV2c6iNru4t1XlpXXOQRJFa+HMeK5RQa9aLgnEtr3e4ig== 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=qMV4UyzUOQ09hPncmPivtC0fJ0ZpejrzMBUO/qs2X+Q=; b=kxBGmK8RKEc9rJUDBFDB47KxGjIkwccJxsXrbERu0CXlRgLSL1hlB9JL7g5Bmz1YCUIF7R63WdFuAt2CSjTGQGb96tzZiXJIPzK+K3MC0QscWbQyPAlaNC5tNlGI3s8pHfCENVFFN7DeqkuTHxaUk7Nze0W8u9W6m4P1X2Mc0URofDWSKzf0ExRLW7H8n4JzeZQNYS43ctwbqJRzgTNzmV8aiscGmf71hvetFzBEHOm1UwqSGFQYeHYDEiu2VBLZdYZyZm2p7PrhiVU5HzYtRuaY+YZyraSRfsO3BWX1/w237g1h1KL22zZqrzyZhxz27IOq22zhZ5nPxeZbR45Trw== 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=qMV4UyzUOQ09hPncmPivtC0fJ0ZpejrzMBUO/qs2X+Q=; b=gsaqTSJAvwJYMj67DzkRBE9rtPoFSAbugGKc7kC5BEUCzEECKwFrnQNhlorocZ2Pb1H7fuGNx6TexLLHAUboL4Wy9Q6uCZ0uN9DsvA5fZCSCOYjzIqo7RiVEaEhSu1XQDavzNCKBFJBEb7DAkrl/XuXJy0tzmoQvRHLIjYEXmldjKrhRc3eDjVItJKjck+jegvoY/YX+10iz0NPGDnML0okdPPekq0c6ZXZ9upf83DOtCvPcJu/sqGNUFlAqdiZpF+Ekacvkql9lVQn0miyKOo0IZYFbipPPsuKawMkduulB1bPC4mfp5lQQ57EdSpYhVByb6Yj4L7kIYr7KalzGuw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0151.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:176::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 14:02:50 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 14:02:50 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 16:03:20 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [WdpgFIxP7qhKClB4PCOAlXFSC/L8xls5] X-ClientProxiedBy: ZR0P278CA0035.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::22) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907140322.725171-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0151:EE_ X-MS-Office365-Filtering-Correlation-Id: 05d9c9e9-34f9-463e-ce5a-08dbafab1f07 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6Syg760GnJOre/ERZ7efRCgIge2Jj2MdIdjvlNO9Udlnw8A253y3UpvdOcFD5RQbLKVmZhh5o4xrPiQhiLubT50d4HLAsMJBUtzy3FoqZ1tRSsw4mtrFxeQSoq+taNyBtRnf7Yx0SIrkTlUE+ntNdrKuja0vGstfvDIgPS0RxGts5rj7QoWLkl41PAfUCXxKNtif3PbLpz8yx3ZqXsBuIN4GTk8XAsR9K9DxePKJw+meFPt4FgB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un2tV7hf+3QZD9PrYIr+dwfS1EyAXMS3mfrlXCKX/B3z9ClK66AQ1Qj/uMGjI72SP7dAjZGJrR8Ha4Db3pjWRxIZmg/ySv7mZDCe1ip7p5lkf2f0c5kNNFyrefPRGsWkdtgjGZ4IE4cERiT3UZmGPR8bPHpqQJXEg0XmAeXKL7Lapkrw6eFsiLD2q+74rIp2lakXDNwdQhsyT6c9CYCCSMrb+OcY0OVsojaWvC4yNbg5zJoRnW7WKilh/fwLTar+ochH36cAfOIGFD/ysLuS8PsBEzW6Z/TKMXEeuuwh5Iw/mf5uy/OrnYBnD+ae0FGfZvKkINF4aItJVuERR6S8fku2UoqAVVo1HetgamjBKnpfztevhNaQJd6F1797qCqrkm2lQ8tUOC1mTwgL1i/i1HuCPQ+8iJaijgNz3CYC1DqOBZQQHtwwW0oZkC1dsigYJ7FhdipILptFMP+UcW9Tc6Qc/5JxXGCIej5Az4PDci8MRvjpzQbjSAxO2CN01vXp+F9cbcb1zVZ2TcfV6d5kbQ53jC5IXIEnCfohc21t0e6rCUqI2UwJyE5v7FxpVPXJcx+Ogg2PHLVGA5nl+PB7QnIKuCMhYuPi6gSWHgtDyUbFPirMsEqimbwfeR1mZLhUi+bSireWIRhHM4xKwPk X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05d9c9e9-34f9-463e-ce5a-08dbafab1f07 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 14:02:50.0479 (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: PR3P250MB0151 Subject: [FFmpeg-devel] [PATCH 29/31] avcodec/tiff: Don't cast const away 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: k3ZXo4iRfMiP lzma_stream.next_in is const for more than 15 years now and has been so in every release of liblzma. Signed-off-by: Andreas Rheinhardt --- libavcodec/tiff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 148964590b..adb49e4525 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -337,7 +337,7 @@ static void av_always_inline dng_blit(TiffContext *s, uint8_t *dst, int dst_stri (split vertically in the middle). */ for (line = 0; line < height / 2; line++) { uint16_t *dst_u16 = (uint16_t *)dst; - uint16_t *src_u16 = (uint16_t *)src; + const uint16_t *src_u16 = (const uint16_t *)src; /* Blit first half of input row row to initial row of output */ for (col = 0; col < width; col++) @@ -360,7 +360,7 @@ static void av_always_inline dng_blit(TiffContext *s, uint8_t *dst, int dst_stri if (is_u16) { for (line = 0; line < height; line++) { uint16_t *dst_u16 = (uint16_t *)dst; - uint16_t *src_u16 = (uint16_t *)src; + const uint16_t *src_u16 = (const uint16_t *)src; for (col = 0; col < width; col++) *dst_u16++ = dng_process_color16(*src_u16++, s->dng_lut, @@ -570,7 +570,7 @@ static int tiff_uncompress_lzma(uint8_t *dst, uint64_t *len, const uint8_t *src, lzma_stream stream = LZMA_STREAM_INIT; lzma_ret ret; - stream.next_in = (uint8_t *)src; + stream.next_in = src; stream.avail_in = size; stream.next_out = dst; stream.avail_out = *len; From patchwork Thu Sep 7 14:03:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43639 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp623041pzh; Thu, 7 Sep 2023 07:03:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5JCnqu4U1odqQnH5mEwsVCsUyPA32LBJV0blQVZZVEuzLg8vb0Ug4FsRnNZbsOAmgdYjt X-Received: by 2002:a19:8c11:0:b0:4ff:95c:e158 with SMTP id o17-20020a198c11000000b004ff095ce158mr4806627lfd.64.1694095434155; Thu, 07 Sep 2023 07:03:54 -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 d18-20020aa7d5d2000000b0052544441ba8si10350553eds.301.2023.09.07.07.03.47; Thu, 07 Sep 2023 07:03:54 -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=J3LbxBlz; 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 5710E68C881; Thu, 7 Sep 2023 17:03:45 +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-vi1eur04olkn2101.outbound.protection.outlook.com [40.92.75.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6C87268C837 for ; Thu, 7 Sep 2023 17:03:39 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kCpUk+5FhXDB1M133e3I8n+YkoTjAdSyH85U26q6wiZdpIGWOfjsVf0P8uLznG0wezLQAVNt0UDeFpDBJQbZbQWxyMJMkGVD+Ru1EOArvNFQSBaZH/jaYKpHHJr6kRewef1tYD2xhw6Yzm3zi7piuxFKeVS92ch8AV606+AkqEYz+FeOaeVJekR9iBB9zlcwLBoRjES8OEhetytUyPGHv6zDNGcPzi5yOdazBWolr27wMGbO+27BkEb85Z7L/WidtpfVoxIKn6WEXkNuGPIn6G34wxN557JpnTAUSW8wCbVUt/cgvAdVaAyHXJhtjqYQMC9paPoAbMFs/roM+RBazA== 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=a97mNJyDt6knEqzasfprQvLFHG2VgM+76z8/N9UURho=; b=RLpVOksXMjC25OYOe6tYU9iWR4vbzpQ48f8FnxX7r+5/eLvUJSJc0lDRpg3HSdDu+OVZJHVUo1YGQ1GRwVCf+xd81tDIdoQTbfrVPIUIO6hInuECMC4wK9+7lTXyzGTl0EUjsYWSPVkPs0LaxaYm4J4UH0lgE8FyteiIoMo32FaikKFkg2r6bqFgwO2o/S7OgR/qCfIWi4Sd2zVH7P9ienUWKsSkMMBJaVt6lPDYl5f4EyYuMM+QmH2H5U3Z8IvExun2XrAVSEoXduzgLCvbq26Mz8a7PbKt3mJBdGQzjpa/FD7hAcZAjnpSjAMAcT/gFHPPw+XjGwz4RjJOVcW6PQ== 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=a97mNJyDt6knEqzasfprQvLFHG2VgM+76z8/N9UURho=; b=J3LbxBlzx0+8NeocSN7LMZc/2R8kWPOwz4up3udKI56HlOEjAuD4qj27ixPPMaD84TcASx9972/q1ngyY1Xhi5NizfFuS5fsjEmBCEVXKz+PG6PZRgSYDULftzLIDtPCq4VdfkDACRmznIaAFNLVNL31CDDeRrkF0mi54FSHGfuJc67qPZx4rfKfhkuFjKQhI/uUY9Dd4m+z3rF0FUyaeu5xXk7d/S0lzHc8Ax2vIzkYlJVgW/yk/ZD3O4c8cvneIIH7CoMRxWYNDd7sLrWJRbuuvkRaqDnSWNQPF8CbZTNOXTD1jmIMs7sm2V1iKw+1QhP/2mnhDGiKIhFAtnVGLw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0151.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:176::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 14:03:36 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 14:03:36 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 16:03:21 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [m8QcY5aubN9+EhHvbg33PiexuL69H/UH] X-ClientProxiedBy: ZR0P278CA0035.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::22) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907140322.725171-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0151:EE_ X-MS-Office365-Filtering-Correlation-Id: 5365986f-77b5-4bc3-28b2-08dbafab3a8e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2jUT3zwb9bIGJQQSj4Q0B0v/hvw1E67QRePSk6eWLcNPWJgBaHehZrMTkcwpue0yyYcBXLNPqiWb0nD7M5zq0RlfWVftUPICYaSrcwHmzLNHWMEY6vQFS7e9OPK+Ak60SRL6GL5pZzCFoLwu9KyeTTeFcIK9JZNY4TiaEXotR+qqZG941UcDWZ5BS5Gu7CcvNxHgTGGCVDvdM+4asOcootTyXvPhxG5HlLEdZruh93Bum7MSWGvCS5/SwmGezioCya2v2HD4kwBFnF6xknG3pAnW6FPL80aF7YJJSxfYtys9hRtA8ZtNTRdA1G0/azlafxVXqUsZF7dpS1N6JvoCEE9lcwJgMigAYLHFFih6S8tYj0niPO83WScisVDgAU1gdKEy2sOFAM96tUNSwcFLK9lxROn69+lwacFmgQdqaoSCDZE8GdiXSZJCgOaP6ZAumcKtKgYRJzsMtHEuNVz/YxsEukee0uz5j5Ga1+c4AybC8pJkmSHgz5kiwT0h/nhSjMpkKpD34P4i67JSLgiUN71yrHoDTmG1nK3xyh2tcDzYnd8L3KRXYCkFzajyvaj5NUAhlkj/XtbSFAtPch9rTHKgI+hLfwL9biJgWQR2f2rd/TRzD9XDGuxZwGp9WdjJ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lQbyOqETWOimHiPWKnObRq1xqnD8tpyB1WzSU5BMXc5UzMGQaE2jZykkMfeouyi2xPsIHy+Xgh02vldR/LBirUUxKv4AwaZGbKkqGPZJPkuxft++FcMjUYUq6tBIGIQohgzSOtcjDpafG27e65dc2AGsRypOI8+CmgZhPCGVfxPB3GRN2sSoqRPbS7YviV8rZn+mSlpy2Iv7EHP9aSqq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rg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5365986f-77b5-4bc3-28b2-08dbafab3a8e X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 14:03:36.2153 (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: PR3P250MB0151 Subject: [FFmpeg-devel] [PATCH 30/31] avfilter/vf_varblur: Don't use pointer-to-const for destination 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: e28IEqD01QbW Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_varblur.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_varblur.c b/libavfilter/vf_varblur.c index f6f8382adc..6ebb9c0663 100644 --- a/libavfilter/vf_varblur.c +++ b/libavfilter/vf_varblur.c @@ -45,7 +45,7 @@ typedef struct VarBlurContext { void (*compute_sat)(const uint8_t *ssrc, int linesize, int w, int h, - const uint8_t *dstp, + uint8_t *dstp, int dst_linesize); int (*blur_plane)(AVFilterContext *ctx, @@ -98,7 +98,7 @@ static const enum AVPixelFormat pix_fmts[] = { static void compute_sat##depth(const uint8_t *ssrc, \ int linesize, \ int w, int h, \ - const uint8_t *dstp, \ + uint8_t *dstp, \ int dst_linesize) \ { \ const type *src = (const type *)ssrc; \ From patchwork Thu Sep 7 14:03:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43640 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp623346pzh; Thu, 7 Sep 2023 07:04:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmqH68oCSnG0zFyOAiHXQHgZHLagbkG1u6arPvloi9iYCm4ECmSWdsYlJDpwG1PCLXw7B5 X-Received: by 2002:a05:6402:274c:b0:52c:8e9b:6bcd with SMTP id z12-20020a056402274c00b0052c8e9b6bcdmr3849934edd.12.1694095455654; Thu, 07 Sep 2023 07:04:15 -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 bx7-20020a0564020b4700b0052c9f1d3ceesi7274379edb.319.2023.09.07.07.03.58; Thu, 07 Sep 2023 07:04:15 -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=fF+RfFbw; 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 6A0DE68C88E; Thu, 7 Sep 2023 17:03:50 +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-vi1eur04olkn2101.outbound.protection.outlook.com [40.92.75.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 87D1468C883 for ; Thu, 7 Sep 2023 17:03:44 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mopfGytPEeiubTNFrWCnIP2zOAnAkgILja75DAwmE/LaV015rXyCkyxrbUp2e1OK+MVjUVxcUxACrRwPNjhW5AzkefB4B35u/VnjCLVg+cvx3R5f9I5RUux9+9sqgI/EjiOJfBbJJZ5PjTjtScA4HKJRAFKxwiS/m+NeYL4DV+4vpEQNfuDFr7d+5MkZrtaPpXo/qBAavrDpGGhzyq7AgeQqRex44wbpSiB18EEuYSKo4TrtSryzUzXWd0gSwlgMoTer7OI/61uOQWXhbNtWOzwJXH+TPiDIfWmMdYOXMM9EWqf430cIK4VGUarabyrlhdxJUi+iIu5xWBOPvbrbXA== 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=+Hk0CbKRBpsdJVDbOtkYf/eyV0aJjRJyKLlkZWBrHO8=; b=P0lZgB5pbxeeCENnN+IzIirSaYNIF3WLWL9N2l6FJj2rYJmiFCUvOdigOYXjNGhNCPhU41A6C657/9R6CSWV/voZ7UfjvYsIXj2SCwKaiKrOoEdsiZ8ajNWQDQxi5u1SkIFd15wafd5f2MLYzAw9cc0liHQITGSaf+OfW7Dt8nAnYJvIUJMcx5YpyVA8LHmQyUqfVXA0txA0V98JV/cV6VSlFRID8j7PXEQRRzvemtZsElXsqKlVrRRbvhXFIsobu8JWw3Sm7XUHPmONNNq5lyg5q9/YejVSl3gY7hQkrgfLLaGNzfCGb70afmhlddWM8psLwpKCF6bgi2TqQrU3ug== 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=+Hk0CbKRBpsdJVDbOtkYf/eyV0aJjRJyKLlkZWBrHO8=; b=fF+RfFbw/6M3MbISfUUVHJ00em96bvwzRTgg4GZxB3fIA3D+VCIu2M7XUc5YxTfFM2aTefwQxFGg94Ov6HCxGSHMcX8acGB0ESyQbPNmMTp/9SBMFZRFl/0ObmtgwWxPEblT+g+lztypTd+ROWHYSPCCY0hDIKSZpwyLgeXZQ/dH1DOxQO/YbZKaASgyiCjEK1YE6E68UbALw+rg876GhAr5jJFmrj/wSP/39ICz5iZofS1+2nD+oICruH2wSA/ZOPu9CiPd3yMd5T/A4uiSHtBR55xOTGC6if7KKSh97h3bBPEbbaF9xzRBW9n9cyz8Vo+cXT1UoEHXj85A+PjSmQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0151.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:176::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 14:03:42 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 14:03:41 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 16:03:22 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [CxnF8MDm7sRMFDjsWPXM2GiaMRTs6y5W] X-ClientProxiedBy: ZR0P278CA0035.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::22) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907140322.725171-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0151:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ee44aef-b287-40f4-9c39-08dbafab3df6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ftvw+t8hZM/KhxPSrLttxH5I5nSTypENLiLlz/40h+Ri8VTVJ2zu1GJNP7bWb4jipcgsgQXVPBY5fTOZlLpjev1R09+Z6ziTMqmvJPBumiIe6wdA1iOw8aa/HNLhlZ/4LFQbXg/JQPR272Pec/s7dSm+Z2uI+m7yrPm4PXj0maI4TT57IB+CJTLvKr5FckVSjlRsl+z2kSM+ImC2ocVf4pDyN8X9WGI2xVjhWQ6+dy8STrugs8IELUBpohjX7XAgW7lMV2Tz3v16txPBeyXOLwIAtqPIorF/Sv8VXxHZfiDnAZ5gokxesfZXF7lY5ikeEa9gkj0JuZoqu1DMIMqpDSJBQ604oVRqsijZmAsNITOVpS6i6aBha9FN/3iU9eg+3PmkMCGftrcTiu+fOH4ObLPLygSqv1f9NA8wJPNAVdEWvHTbhtpcu1HDZ3JgYGwzDVPio5F047MEtzDvV4VniJHJMJDJOdxTuqBjqbFI650FLgkqTW+pgFnumXD2H1Jt1p0NA7waurBQyahki8Erk8p6tegppRDb/joB+AAZNso3k70x48wBsVPEalXzMezkLK2bL6SvsQAVksK4JRtRCzy4Od6HprRlDEk8sUEMVdB58/B5Onc5vcc2cv39lVUM X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JO/uzzj6eOPpPZvftJ+HUMzvVbn/UytIALkeWu1SLjM0kTN6VoSasa3uc9NKgg7iak4rWKfhp1ohjNyuFtXLNMWUEt/xzSd2ox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SdCYyv6Qelo1BFizkmASwSALhfwrjZjtU9Ev+C/m4DGdO34kwfaPTOf+UdKW+aeznEnHJK7/2+M3vdpv339Ti X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ee44aef-b287-40f4-9c39-08dbafab3df6 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 14:03:41.9291 (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: PR3P250MB0151 Subject: [FFmpeg-devel] [PATCH 31/31] avfilter/blend_modes: Always preserve constness 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: H8NGZHo1X7Fj These casts cast const away temporarily; they are safe, because the pointers that are initialized point to const data. But this is nevertheless not nice and leads to warnings when using -Wcast-qual. blend_modes.c generates 546 (2*39*7) such warnings which is the majority of such warnings for FFmpeg as a whole. vf_blend.c and vf_blend_init.h also use this pattern; they have also been changed. Signed-off-by: Andreas Rheinhardt --- libavfilter/blend_modes.c | 4 ++-- libavfilter/vf_blend.c | 4 ++-- libavfilter/vf_blend_init.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/blend_modes.c b/libavfilter/blend_modes.c index e2be676243..65c5e6f890 100644 --- a/libavfilter/blend_modes.c +++ b/libavfilter/blend_modes.c @@ -93,8 +93,8 @@ static void fn0(NAME)(const uint8_t *_top, ptrdiff_t top_linesize, \ ptrdiff_t width, ptrdiff_t height, \ FilterParams *param, double *values, int starty) \ { \ - const PIXEL *top = (PIXEL *)_top; \ - const PIXEL *bottom = (PIXEL *)_bottom; \ + const PIXEL *top = (const PIXEL *)_top; \ + const PIXEL *bottom = (const PIXEL *)_bottom; \ PIXEL *dst = (PIXEL *)_dst; \ const float opacity = param->opacity; \ \ diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c index dfe2b8b174..7100d9f372 100644 --- a/libavfilter/vf_blend.c +++ b/libavfilter/vf_blend.c @@ -133,8 +133,8 @@ static void blend_expr_## name(const uint8_t *_top, ptrdiff_t top_linesize, ptrdiff_t width, ptrdiff_t height, \ FilterParams *param, double *values, int starty) \ { \ - const type *top = (type*)_top; \ - const type *bottom = (type*)_bottom; \ + const type *top = (const type*)_top; \ + const type *bottom = (const type*)_bottom; \ type *dst = (type*)_dst; \ AVExpr *e = param->e; \ int y, x; \ diff --git a/libavfilter/vf_blend_init.h b/libavfilter/vf_blend_init.h index f531338a54..d24f178032 100644 --- a/libavfilter/vf_blend_init.h +++ b/libavfilter/vf_blend_init.h @@ -82,8 +82,8 @@ static void blend_normal_##name(const uint8_t *_top, ptrdiff_t top_linesize, ptrdiff_t width, ptrdiff_t height, \ FilterParams *param, double *values, int starty) \ { \ - const type *top = (type*)_top; \ - const type *bottom = (type*)_bottom; \ + const type *top = (const type*)_top; \ + const type *bottom = (const type*)_bottom; \ type *dst = (type*)_dst; \ const float opacity = param->opacity; \ \