From patchwork Mon Oct 11 15:36:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 31064 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp3822053ioa; Mon, 11 Oct 2021 08:37:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuV7F1/2BZMUw1H+cOIKXy6wIXSXd74QNfxfUwErHBZUNkh0fIf1Aah9qoQEaxT3EnsEP6 X-Received: by 2002:a17:906:4e89:: with SMTP id v9mr19404699eju.354.1633966673131; Mon, 11 Oct 2021 08:37:53 -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 m10si12200756ejb.115.2021.10.11.08.37.52; Mon, 11 Oct 2021 08:37:53 -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=kSjfKRnU; 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 D3B5D68A905; Mon, 11 Oct 2021 18:37:15 +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-vi1eur05olkn2051.outbound.protection.outlook.com [40.92.90.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3F7BD68A8E7 for ; Mon, 11 Oct 2021 18:37:09 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=of72POZmE4oFtn0mX+CNAAIqctwGzRIxfuccXRw7fQCTNXZu5vAsTsEP8dPZjx4LSYX5k+yWeru70k3etnjJzToxraAMWGEtDD4AM18VuUWbO0p8TuWfSuAowzoHsItrkILxseNMJc6z9pXRqWqQYbj7cdEbijWk0byY0c4szfq78tKdi1v4DlW8f5RY3Nw7L4aK3maXOwIpXYyFQFFNXsjU3vUDEUJD5iZtxYBL4R/hOfC6cDsC6Qzd4EsFkWzwm3FFpJ0IWyWeJS/QJcO+8zbx4J8kzTmEuJxE7RQv+ukmUnLfnUoa/eud8bT3WkMJxN11SzvA/iTHEukM+MuKTQ== 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=JC7mTYrXiyUA08Quhvupmx40B0hDLx506grsCYAH+nU=; b=kePghn414CfI1P+UAQJdm8AfNCvYnHmOB3o7JL9GvhO0AfzpP7txkqXCZWxwlbLd8Zgpe80WPN1ESiWWrFiaAUabzowfSrzvSClg+kjvsAJ9YcgKweGyZKYO0OtFP089q/C1vvu/+TamiVhGY1Mgg6W4f2A6y8Ji9AIS3wbWUjiq6A3vp4wBX9WyTECiD6frRCNeXITtbrV+G0xlN+X0Zxf391/Hz1WKM6f50XzMK78P1TwjkKwj4hvaHyr+rkM0Lmlq0U+pXID4EE0fN2FmJOUlEeaN3ZKi8c9cJehBgfV8s6iyNj1P4xbZssh6YN4XNgQVbva+xpG0pj0RNED1tA== 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=JC7mTYrXiyUA08Quhvupmx40B0hDLx506grsCYAH+nU=; b=kSjfKRnUvsaODKKu4T2EGnVtj4Q3s3TnFuy0R5v2X7bLluEdsxwgxGZYAoaFeHA7ZlPEYuUnw9bM/zWdvu9CYt1iOa1IszwaPx3jVYA8TEWKqm/b9MDAYZNR6GGlBgkY6IM4YG2JYihjNoDPPvjGaGbhPKMNVLPehif+3W6GBDHKQIwMvrOTjlOtMpz8tOBGNdxlpf8MswWF2IyMQ7dhEgUneFKRtG0WbogYFGiGhv2VOTKYHJElOBEt/8Gahe2S+r1RG+R2GRkB7yJqNgi6Zn2SWSgCx8ukR4IKoyXZtFjx4AaV/19OU5D/F/zREKrxcEJ7bgC0zO5bMo5CS6l1LA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM5PR03MB2932.eurprd03.prod.outlook.com (2603:10a6:206:24::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24; Mon, 11 Oct 2021 15:36:59 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%9]) with mapi id 15.20.4587.026; Mon, 11 Oct 2021 15:36:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Oct 2021 17:36:43 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [8qZomQJ2v7HxB47leVC7tCp7lyWuarEm] X-ClientProxiedBy: AM5PR0601CA0070.eurprd06.prod.outlook.com (2603:10a6:206::35) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211011153649.1961025-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.193.170.49) by AM5PR0601CA0070.eurprd06.prod.outlook.com (2603:10a6:206::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 15:36:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5b66b5c-f05a-4536-6cb3-08d98cccf6df X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiS6+TXmMYPOjHmO66YJyNLlmzJSMdLPd6or2N5t/VAQraDZdI4Bgx+WFZ3/HWRAiUtFLp2JVLViVgckDVQ/jR/nYNm9RZXgRepddInPvvCD3YXkNlT11izcW1ay228urZNbWzvLv1n8UpM5a0Hircx/qqMrbnDDak+n2t+StSLeFTPjjhqhVlcTW9Nt1w4SA8CMUfx+DF0QPZTaFZr1NfjmyjoZC9Ze8ae9JpkLkxRQjV+/u/EIMbemmrnDOeXWdjq5kF1910NTKyTfiDT+FgGiD2SCcdkTijWHlKjz9bMrm4eYbdZq4OhwExCreO1amiJlulyyymAKwSIkLjDcdanlzpAm5BTUPzw1TXHT2QFQkrZ+gUFybychQIkqkSBxz9qVr+sDanRdhcB/sos1SjEbiCLEPU4UEHEnoEacUX68wPYWCzFr5bt+0X7ffFrw83fuPvop8/jLuPFTi22zinZkuP4UuuzgFN6ILTvA/xwxXZyaPFifAl3ukT9GI90NvJu+E3Bqdtc7AKty7BLdS1r16OHZ09O4hDme0lE4A0HB1KFoCxK6CZOOIghAHsbycGDOKB23hORwoGpRG/kY+lemoJGBbBpAiBoRHoLbf1kKnGcc+koKpVpoqg3X0HtndCQ5EWWdHAbq7lQ4U4nb1TThkmeZTypZLSoVc4P/Fdhru39UOFgucSb34UCPvVrUz8+zZhT2Fr7K7ovhRFxrTFRNz2D0T4I6kZMA8xnSJUE6MIcAAORyQGgwN/++3oB6aSc= X-MS-TrafficTypeDiagnostic: AM5PR03MB2932: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YnwIJWnYhIEN5fvfeGRC5V9awog3zBdyuzM6cGhFsCOFmMJosig8i+9K7daIUAW1fN6Bj+lKEQs20hZZ7RMHEcjh4kYxqnDLumkBK1+a1lnyc3kfZ+J34kvYSDOvFsUHfOEljDZPpGj5mwVzZyq0abEBFqp8Haeux+2XJCkatv5xqL2gP1EvB1b7MPcgfaRZXD4pzOzDItE4/VgPvt11x0l4KEYeTtdlTds1HIhFZlXVnS9/rBRZseMX4NQ+MDNPF5S9uSL8CwlJPaxQpexSO/5u4+UxvxJ/6XXwpMOccg0QoMrxOP/Nt0u9jm5iARWKITHudRGHOO5Z2AQLzUpsXOVipQvOKXHjgk7BaoYhDA4Fc07SwEM/iNb/cUoLTHSlqm4cW86rOHhduYogdXyJO54r/5WLWxFBbgzNkC5JSJi9RVGLnSQ7xnvhGJJflORa X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: D7w5GtZITMUQR3KPhcZ4IrygOwg45Z4cqXCcTJFBbWFqVSWzYbrW9H7S9ye1QXtLK74siWO75YV1tP6g92J/xHfxn9zqUUIy8F+UbRlOKSr60elW/eEpZIPzAw0Em/g8RnmrbNzmSQdGO36EVwhLSg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5b66b5c-f05a-4536-6cb3-08d98cccf6df X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2021 15:36:59.4930 (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: AM5PR03MB2932 Subject: [FFmpeg-devel] [PATCH 04/10] avcodec/binkaudio: Use AVCodecInternal.in_pkt for buffer packet 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: siQ094tGEmIc Signed-off-by: Andreas Rheinhardt --- libavcodec/binkaudio.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index 59ecab25c6..f808141ba5 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -140,9 +140,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (ret < 0) return ret; - s->pkt = av_packet_alloc(); - if (!s->pkt) - return AVERROR(ENOMEM); + s->pkt = avctx->internal->in_pkt; return 0; } @@ -277,8 +275,6 @@ static av_cold int decode_end(AVCodecContext *avctx) else if (CONFIG_BINKAUDIO_DCT_DECODER) ff_dct_end(&s->trans.dct); - av_packet_free(&s->pkt); - return 0; } @@ -341,7 +337,8 @@ static void decode_flush(AVCodecContext *avctx) { BinkAudioContext *const s = avctx->priv_data; - av_packet_unref(s->pkt); + /* s->pkt coincides with avctx->internal->in_pkt + * and is unreferenced generically when flushing. */ s->first = 1; }