From patchwork Mon Apr 8 20:13:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47962 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3f98:b0:1a7:a0dc:8de5 with SMTP id ay24csp139528pzb; Mon, 8 Apr 2024 13:23:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU23wVqGqyV+IkD0Onj89oJPZUjIdUd24FXnjw7u8LNo3df+6keS/3VsypmOtC1vvJSFIzisU/rkr83MS3hP1ldYdmvjK/DMJeVCw== X-Google-Smtp-Source: AGHT+IF8tv0bBmmGWNTjGpwkNfw//S/HTNROAPedKLgOl/8MV31eXAwWNSLn5smR7PFMBb8xtgIB X-Received: by 2002:a17:907:980c:b0:a4e:e61:b5fa with SMTP id ji12-20020a170907980c00b00a4e0e61b5famr8811854ejc.15.1712607806922; Mon, 08 Apr 2024 13:23:26 -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 fi29-20020a170906da1d00b00a517a32eb2esi3837471ejb.467.2024.04.08.13.23.26; Mon, 08 Apr 2024 13:23:26 -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="Op3Xxg/3"; 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 DC25368D34A; Mon, 8 Apr 2024 23:15:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01olkn2044.outbound.protection.outlook.com [40.92.66.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7810B68D314 for ; Mon, 8 Apr 2024 23:15:13 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f6iMs2M9fqCW6CodFQP7UWj4RovuhPpKPWNg76tAx7XlWWPcqdeF6ei7+/td1loTjhbrJm53h62i9qJILG1895UzZmf1L59HLbq1kb95u45t7oLkMqhigxxDdJ/Unz68sdXFnZjAWDqidmTNcy7gRl9eoCJv713fJXvXV7ONk8R2jVGMvWDZef0gDA5T7wYXY90sfWX39BAQDCru19O2YzuUdEkMRRh9QzGb5tr1bCAqoB8jnlIcUYO8zEOVskDtAedyxa9zVKfu9p//g1BwO9MWOycs5J7M+dyB1gu1XK9IaTyOjlhpHvJvhSeB/QCI6puEWaHgtqEjGB4gtbVgGA== 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=CPUloiTIhfmcX82oXGfB9DOAuBsKs0IGf0RLHjvu5cE=; b=M8g4JrGwEmC7gelKqa/7qhnQOGVe8Ft6u2S03KrlXenS8JlRl5DtyFekCLQnpG0sGnQScD87aNoj2clgQovCNiGDRxzpaz80xNpGR8GPWiN3ouMnle2tHegX/+DypY8TqMJ50zAmuwUYqS0nc849goSJZ6ntG4xU7+Q9cwEe/XPNeCBWOv/pLRAOCOV4P2lLFbPZuG91M5JqtTECrTNpPgRgUBdqiLyjzzmRvbWL9f346ZqjG9JGW30UO2OlLaKHBtYcl6O7ZU++dlHd1/XuNwG7jZRblz3Ea8g+TFVfEMs3DpN/KX5FaaEbmqHbxReMso/z5boouWQbKwWMTZY+1w== 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=CPUloiTIhfmcX82oXGfB9DOAuBsKs0IGf0RLHjvu5cE=; b=Op3Xxg/3pDcAHWK5QFHW6DFyUBJZZ9gBuIeUkLMeE8P1YyS22jenC3y1FuJr5tW119soov66HQTmr9D7RByIx+jV+NtDqLuMFxpIGdh2+z5H26WObeA2wxm4s1d9H8Ik/6X7P9MDCE+vVKKVdimfsEqAXMapnqIOJlBA/UZ+z/vDxQrP4RiWfx6OumuQQoJuLuON8Rmv9pMKfPsT2jrBMmv/jQkLIvTNV7/bbevcLP2nEyR2OjMEoHWxOkG1vjNuM841Sj7cvr3HpsBhJ+Z6iYKF5WQD1y+E/NUDPPtxbVleExYYagdKQEFVbDJHj6excMSnVUyuClxbFOekSn2OCw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0494.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:28d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Mon, 8 Apr 2024 20:15:08 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Mon, 8 Apr 2024 20:15:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 8 Apr 2024 22:13:50 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [N5J9p0gYXMHoqQ5qNqJxo3l+oU5kLB7nErJpkNJ3pmA=] X-ClientProxiedBy: ZR0P278CA0124.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::21) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240408201405.2136840-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|PAXP250MB0494:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d18b0df-b3db-4fbc-33ec-08dc5808957a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mbjG1hmz58rj7bZDEm5orvwVaH8dKQdr3UZTvPrxzfdZ80wbFNDYVmJmWPX2YwNG8kUUTeOIXNYqcrwyCmr2YreS5Aqjm4P8NQsG9wtlcnq56rzrSkLpCMzbUwqFvnIfBtoePD2PCt4YFhXtKV4NLpVKgK4ATnMOEujPnLtsqzL3IqvQeG2d2n27He3N6lTIE/VvooeS/8e0bC9WjCL4slCorIyvTgL8aeu+jGR2ME7Tu9w/3djYJQvuJ9rNfz8jKLFsc8kKlJP7JDRVCkjAwosO/KTUrRCbMft3vZ2k1p0KJX3azpUZI2J+McWcQU6mj5G21VMhgP0wW4lT2Tb+hC7wSsHfHn9MlGbeYHpUxPRxp1BozbVH1ShmZQmNBiS2eE8bEhIKc2PmmmyO0qxXOIgkp/ST+OceGah+E1Z9BRnsL0u0+3KxfHTSe1VsUuAPOx/xXnf3jkH0mU6kInKRJdrVTQ/eyI8j3Y2GJlVx5UbKUminSy2eyA9mRHj27wtLPuD9Dn/8iVR49DYUwgGR08MvMy3gqljygT47Lespy8xW9kaObLR/q4pTPIhUbqsmzltf6OwUfpkXHg83ensK0xmbNTANsvi8hRz8pnqL5sM7Al7tBpd5lcRrWjh0Qq3+ X-MS-Exchange-Anti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b4AD0fNEYd+VnE3hNor96VBUlD59250wLv1Jp/YBAw5SQoR0UKHRUGvkboB+ZFbiqghuYBENF/PwFnhBdsitHhjTdk19XrBkQ9vvgImTXjoRkRxbhEm9lHYdicTgumC3tnn9UF3tyKEqVnPRUgFoM6XhOEoMaKvHKjvjCjQOwsQTLoNRh8N4mZpAOQatz5X04iokjKmM+g+M2ujA2k/FMX3qPPpgEJGPhanVLY8iVfzXVVFwToOGHG9e4jszUHoTY9qqgIM8+2lACqwbj/2uw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d18b0df-b3db-4fbc-33ec-08dc5808957a X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2024 20:15:07.2717 (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: PAXP250MB0494 Subject: [FFmpeg-devel] [PATCH v2 12/27] avcodec/wavpack: Move initializing DSD data to a better place 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: TREFqckW8xps Namely to code that is only executed if we are indeed initializing a DSD context. Signed-off-by: Andreas Rheinhardt --- libavcodec/wavpack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 83f42f392d..6fd297a002 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1011,6 +1011,8 @@ static int wv_dsd_reset(WavpackContext *s, int channels) for (i = 0; i < channels; i++) memset(s->dsdctx[i].buf, 0x69, sizeof(s->dsdctx[i].buf)); + ff_init_dsd_data(); + return 0; } @@ -1533,7 +1535,6 @@ static int wavpack_decode_block(AVCodecContext *avctx, AVFrame *frame, int block av_log(avctx, AV_LOG_ERROR, "Error reinitializing the DSD context\n"); return ret; } - ff_init_dsd_data(); } av_channel_layout_copy(&avctx->ch_layout, &new_ch_layout); avctx->sample_rate = new_samplerate;