From patchwork Thu Apr 18 21:30:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48162 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp251252pzb; Thu, 18 Apr 2024 14:30:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVlhmo1IJ/uWQH0vxQy56RIGZXUKDS2TpHs13GfdvSiujiz3yrl+qvQG5sB+nVCVUl62SZE96JWutLvlqL6sxni6PA6YMPd1OOI1A== X-Google-Smtp-Source: AGHT+IHbFvmZtzeKHsxrzC8hWRFqk6jSoGD5rNL9lnaKjKKKNcjeupqaD1nfQlpUUmMfY8Nt/jE0 X-Received: by 2002:a17:906:f108:b0:a52:3ff0:4a12 with SMTP id gv8-20020a170906f10800b00a523ff04a12mr153482ejb.18.1713475845486; Thu, 18 Apr 2024 14:30: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 i20-20020a170906091400b00a555faeeb4asi1302319ejd.856.2024.04.18.14.30.45; Thu, 18 Apr 2024 14:30: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=Ta6gn5dV; 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 B619D68D2E3; Fri, 19 Apr 2024 00:30:41 +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-vi1eur05olkn2031.outbound.protection.outlook.com [40.92.90.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 06DB868C8CD for ; Fri, 19 Apr 2024 00:30:34 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hCERmUy4NBKadAosaQdoYDbm+P8eWAP2iMppMBeiF7WG+qyPytE0Xo3Q3PUofGpfHnl3+xQVLiPz/Og3v7NaDkgWKW1rTVj0o4WFfftful8ijtAWs/T4hryYhcALd+EJ2BJM+qmfuKNmX5pYXat/Bv/4lQdDNPUBxoMoSCOS3AOJbF/WDpuY9HoQYCBCppkJgNd4v3zd9YsZn2WqhRlaBvG6IgnxDvky+Pma15ZzRT7nK84iSx3u2NwRkg9bxvDwyiOfKtCmFF7wkQZ21w3mvr8pSOT5FqVC8yhqjuWyvbvlE2EjZFf7GXWSjllFJwItlGQKcN2qfx0m6ie6YPIyLw== 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=ojCWTkJ5KTJDCrB7Faapm4CbeC7lPqwnFdwumpGiHtY=; b=jpQQhTVV8RmJcdMxdosvaBGyBY32xsJRT3RbxNTbp/xKmSYnBT2hYZcDmKZtaJChBSyUnVE7ROnTgHohQzE95/OO3+dLcHE1NDBGsm0NuhLbUkG5W02cNQU/+4go4cRWmMou5oKYBTMkyPNefH6sYTLhWHq60Nv79IJH3WpMVnctLOaVpzCp1ViDzAxOrs3BRtr9irF90ZoSRtVMIssEXVWnHwm8fvXWIj1GkLA6tq0cfTzmu3BifTroic4MS5zMtCSK2VK0R6aziAYbQmmxv7On5VlyyE7nSthIWgyvcfSCQMadrnutHP5/hfWpRCzybkxZVUL9hKbqSXwmzDDFvg== 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=ojCWTkJ5KTJDCrB7Faapm4CbeC7lPqwnFdwumpGiHtY=; b=Ta6gn5dVDqmBDh4qMGusxHl5n7gA00P/4Pl6lFzCqdMDgdXkIFtO2qaUer6lOSFTFFaaBwEgOhGlGCAQVVnNYv5KAtlTMGJNB3vK4xsFcZ3o3hrlIfC+gUQrOOkdPpVfdgg7E2LjMnOHWuOTHzHUymNYOcWeY0jTIgUfwRKbm2A4UnUk/tvtU0IOSLXR66HnL5HqozUeJcz3tkp4wfYJOG8BXXxyxk1gLmrSOTFWyz5judhsxPjXwnxaaV2x+3aHgi0Du5T6Kp6Lk4EUKL+II8hezra1P0ErIjOibdtFBXum9n4f9nOlqG7qf2Uod7y4paEgmJ2qJCwbyxJ0x+4lrw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AM8P250MB0060.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:3db::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.43; Thu, 18 Apr 2024 21:30:33 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb%3]) with mapi id 15.20.7409.042; Thu, 18 Apr 2024 21:30:33 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Apr 2024 23:30:25 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 X-TMN: [AAnvySiN+eR+CAwx2Ay9f6DSqDRRmcIu3QfpCovHtO4=] X-ClientProxiedBy: ZR2P278CA0007.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:50::13) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240418213025.42882-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AM8P250MB0060:EE_ X-MS-Office365-Filtering-Correlation-Id: 959afcbe-36a8-40b3-9964-08dc5feec73f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J7y1rpI3RdkACECEWJ9Lv71BvvtNPsvDbc2oLSf9iuO1/9K2pUglZjJBGgB/ZKYXBsKG/zAO5yPfCVMBoVfwGzCcLHBXfmqAjA6PSHl5bd8z8+fTezWY82BbUqKVgfYqNzPVLOWoDmMNyc4dbxXnMCMvLSrMjH6FFZPOyYSQaHqOeB8aFUyvxtF09yCeVtSoQjkqtt+lHuQadE9AHobBxkISkDuoPpGR0mwTii0OOm5Nr80DLWqXZ7/KGmIl+oZj9W9SoygmItLRViINWbUQkCEEGuePQRr6s6QPtSMls/PzjW4+r31nRS1uBxkkFBSPTqst55Zh7y0niIMBfcnr7by1RxdC8eRLY8K/H/FnoWXUxA0tZKo7HMxnIIvyS84L12uEE2/Qmtckftew6K2chZehS+OJdXlPDDjl2A0EYNn6xBHNS2lQQxxIzD/a4N8E83bJGNl+MLR4gg1aTySahI6bCwX+5Kmnl9aApEAaIdbi9cgrI5rNL6+BNsUboKmVUXFEMPxkmPe04XFRkhpXdJ0ZTcxzuP0utOwtPZIEUM2kW/D9DeF/HyEHlWu5eEoZ3YH4cTVHXR0dFaF2zoJqDsuSOY4Mn6iMXh6wi+huhzXolNrfuWqtBJai8O2E32qC X-MS-Exchange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cBBEhRXXQC8Cmg2mx4BMNC57ySQBr9TjPLEEDJiJ1kth5hMJ8sn43Ps1p/pSd5jz75pJe8NCxFswaAaNY/co/LpVbjtcTWmvQquCVupL/DpW6zxxt56U3bq+rxhBfEzhuOaw5nDVyB6ihJikaCYtqZgvUQeWvstur9GlxAa//kkXoLBo3R2qTpHWBNYHvti6gJsYL9bEk7pnRrsQehS2pgeb+OsGNzWIbP1iTOIkwWGr5MeHvCbf0mB0V1nRko1YZyTasbUcRDnSvsY9iRAwuRd7M+bSk7317bNoQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 959afcbe-36a8-40b3-9964-08dc5feec73f X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2024 21:30:33.1888 (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: AM8P250MB0060 Subject: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: Fix leak of coded side data X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: LKIb2rpIURRg Happens in the mov-elst-ends-betn-b-and-i FATE test with frame-threading. Signed-off-by: Andreas Rheinhardt --- libavcodec/pthread_frame.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index f19571f6f8..a984ff94d5 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -731,6 +731,8 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count) av_packet_free(&ctx->internal->last_pkt_props); av_freep(&ctx->internal); av_buffer_unref(&ctx->hw_frames_ctx); + av_frame_side_data_free(&ctx->decoded_side_data, + &ctx->nb_decoded_side_data); } av_frame_free(&p->frame);