From patchwork Thu Jan 13 02:07:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 33526 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp46267iog; Wed, 12 Jan 2022 18:50:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8rOn5kGelAdeJqLUrRXJEwp9JcuB5V9TKMqOUTzjF0o7OsOIKbBWRqLA45jBeM8w3g0RS X-Received: by 2002:a17:907:2ce1:: with SMTP id hz1mr2047168ejc.199.1642042250863; Wed, 12 Jan 2022 18:50:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642042250; cv=none; d=google.com; s=arc-20160816; b=l/tvkf3bO2lGPL8129F4d4yKcLQH51iUcNl7tOlF4SGl84LxLbDzYim+nT78Dp6ZH0 K47nKYxlud5q39Rd5Zh2aUuIT45nRGaA3sdX8vlmukc6kilhgPi+W5WWzLzpHoot5kIX XZHkEcajGzIURG3HZsdkcYFF9WF1gyDnrwzLhDtp6NXbw74uPFBBDzXoyOpj68cLL/Yi tOLVc2IF0ROMNTePogUHKNZ9X46EUHxS3brl2LOvlsRw/t9DB9qczOj348pe8anbSCKi AZeuGtpTk48wqo8yRTcffn1mNz9Z2YXw/5PVKcc2LdCHw/trUFyYuW1J6hlcvO51eoya 68Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=55DHXMun/MA9iU8GkMUrF3bhXwBSjihsxQ62yzSkUKo=; b=chzUtObJblg1tr50B5MXiyfSE0+sQnanV7TFu3vpgFG845IuhoF1zfcnQxdtgmNt3x yy35tdjvQmaQYXI45u3hKstQHzCbUa+zK89BPWM8RllhNnXkCkqyYw1lI9HutaoBsTZE I978zi+TzWMAAZaMr7zjprhd49T/Ff980F4aXxUvIfMi0EWjoC9ZyTqdMAytQ9DKC7NU SvMb3XJjdp+EshjTbbIXH4qgjN6pljq3g/EneiOA9euoqgXCQyypOt8+31ar/uJA+xEh ODlMtUlbnQyUgwy42UveiUKVcgO5Nio5M7YiKBuAWvOKJvyBRRKC9Amwb3EgrYm0HRth 5LAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=Rq06eXNu; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id go44si830801ejc.677.2022.01.12.18.50.50; Wed, 12 Jan 2022 18:50:50 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=Rq06eXNu; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 37BBE68BA47; Thu, 13 Jan 2022 04:08:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6C71F68BA3A for ; Thu, 13 Jan 2022 04:08:02 +0200 (EET) Received: by mail-qv1-f52.google.com with SMTP id q3so5142536qvc.7 for ; Wed, 12 Jan 2022 18:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=L2phcX/UUp966sDI6gTk6laEGIGGrzLA4KUg+RBq5AM=; b=Rq06eXNuyMt/qgm/jT1hrf8Z4OoB1eM84KUjqsvCWZ0GNv9fUzPi3AEkN/44S1qSTK g8pTlMSdDRnpFce/4mqG+Z61eFUN5N1nCp47wos1WWU0pzXO2woKtAvR5+HUUBGZTt0b XRbYyEwnf9vRLAOsq5yan0lKtxZHUSTwS5pqTqENxSQBtFW2c5T+aYqYFlJpWdJx23/h frjVfHbTNbmW+8L5Aw12TTHgeoDOl/ou52GCIv3bf26Gc94ZxVPh6k1gBCIvEUD8hV0x M0cCLhwylqeltJdGpcCgM9qwyFwXhtwOilT0OZ5Se8Y13xRf8eWpM2Y5LdG6cu/pzIbd tOEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L2phcX/UUp966sDI6gTk6laEGIGGrzLA4KUg+RBq5AM=; b=mKb3FuuxQ3sHCPoxLA+0Z3LNAYqFTYzIx+cY/XX0Hh7V0HdHjrsWw1N1kaI+Tq3wRx LthH9dLbBjPDXv16AWsS0s3wM+Ofn8rOxkT2l7El+fYe3UsVw7Gv5rbQeCTiXaSO0Xlv E7Q95lpC/u2H6P5LHhfYn3D5ZQFsDuWOhP3E/IXqvLnXEQmyDbd1b9IfyhuZA1QJM6fl tBlGKIBO0sV8EaRYTdbrCa64hq5uI0UDNy/o6+FZTfKYMALSxsUjc/6nAJF1cro07dJO EhGgIUw30VIC2gwP8vCXjX8z+nzVXDMvxdkM+fDLpm+zI8pARSTswajCISizjlxM/uXX 5grg== X-Gm-Message-State: AOAM533ulF1qsxBRuMRjeM2AiB2PpCceNsHygRWeDeWahh6csPpt8iZn Tsi0hj6YSeUHIWpEFKRsoPNwNyaS2/w= X-Received: by 2002:a05:6214:2349:: with SMTP id hu9mr2163465qvb.93.1642039681022; Wed, 12 Jan 2022 18:08:01 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id a16sm1085946qta.13.2022.01.12.18.08.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:08:00 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:07:10 -0300 Message-Id: <20220113020713.801-27-jamrial@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113015101.4-1-jamrial@gmail.com> References: <20220113015101.4-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 266/281] vima: convert to new channel layout API 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: E3upDCtCLmBf From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/vima.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/vima.c b/libavcodec/vima.c index c9a81e4401..5053feda90 100644 --- a/libavcodec/vima.c +++ b/libavcodec/vima.c @@ -147,9 +147,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, channel_hint[0] = ~channel_hint[0]; channels = 2; } - avctx->channels = channels; - avctx->channel_layout = (channels == 2) ? AV_CH_LAYOUT_STEREO - : AV_CH_LAYOUT_MONO; + av_channel_layout_uninit(&avctx->ch_layout); + av_channel_layout_default(&avctx->ch_layout, channels); pcm_data[0] = get_sbits(&gb, 16); if (channels > 1) { channel_hint[1] = get_sbits(&gb, 8);