From patchwork Thu Jan 13 01:55:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 33379 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp26044iog; Wed, 12 Jan 2022 18:13:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJx71fi5RmsYIzchC41DVplr2Ob9T4q/OiF2S+mjM5j54CRL0Xg63mDQHyUdVO7A2zZNO62C X-Received: by 2002:a05:6402:268a:: with SMTP id w10mr2312890edd.10.1642040027571; Wed, 12 Jan 2022 18:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642040027; cv=none; d=google.com; s=arc-20160816; b=jVE0d4YJfieIaIpQKiYBj5VnoMo5HX5wgp3c9nHFlx2fbMmRpox3XIqvLxcRTKYWqS xHESjPyIe4YipOv4yCfx+8uW4o0YiNNOZ4DTczsth2uV0erYOFnwzeXuEkBhofaeOfms 9dChUO2F0yN6VwomWzZcDV70uyggiES3VRxmzel4xTfMPJzlC8ZamFoe2zIjbr7MRnvs koOTHSD2XaLzswSTklECcOuz8gt1VeCydZLk8LGvftM5xhT9JY6HZooOs6DRQazzC1tI YTvdKxdytpVqbo07tAK+c/JIIUHij50cuNPE9XBDQj5GaO6HFTWHdRHqH9u6Nemov49H 15sg== 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=EIbDQpufpkiMmgwA9xxxgAG29B9sXxExP1ePwz51TW0=; b=XIoqbrFgqwbsof3dWecovaDTe9G15P5cFhEWTbO0AlJUzmm1zJ5H+HGr7DmJ58f2yk 1nHvDZ9n5oyew5BQ9kR3VaFKCbO+tQqh9AE+Kp2FqdHeCRWn3xFsPAMWnf2rTv5ce+lh Xbs6IZEJOwA8t/wWUSOatRmW2ZLF9VyJ1cgqpc6jiX6QxWMuXnuJT3HihtcjSjOW9FY5 PMX5DWDh2m1VWB9snzzHl8qVeuqhKI2htm+OGgwCO6uz2r5Eq0ggMlgN/MSyCkQu4Pf5 lMRbqEzqMljq9ImcBVNGeXIQAyav5cISrCtzn1dCmexbXEdglwRZuSdkXgC1Bm41IvIc lXXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=lqTXB6SZ; 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 jz9si773635ejb.459.2022.01.12.18.13.47; Wed, 12 Jan 2022 18:13:47 -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=lqTXB6SZ; 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 CDEF268B277; Thu, 13 Jan 2022 03:56:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EE67568B25A for ; Thu, 13 Jan 2022 03:56:39 +0200 (EET) Received: by mail-qk1-f180.google.com with SMTP id b127so5634636qkd.0 for ; Wed, 12 Jan 2022 17:56:39 -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=eF0rECW3TvC2JeLaCrSYgBmmZBM/m1vxRA6VMCDypzk=; b=lqTXB6SZqDxLITe44IOMQfvhtP2wNC+OWZvEaxMkqDBQSNIQBnCMjGw/BQjcP5n32p ZEfhgVE6lguo0hp0VSD5ejwLHVToIHLFTESl61qLS2TnQ4JdjhBx1+9F3ffh49G9pbTx Lq0KQ1rsqELLHAFWO0EOM23WFTsxInE16UeG+DjT5idsdgEUIXr4T7NRHOXUu+XkMPux 2N5lUNUIKtTMG5xQedQzePiaHU1bHoqY6mkyW1qiTA7G1tbMpeoLSIh1LdOidDiwnkCO wFtO/pvppPZz8RbymXnltF2dw9SYOnM4QNt7kWKVV0Q+gr6mLlOadcdkrtejXTMuWzZA FCEQ== 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=eF0rECW3TvC2JeLaCrSYgBmmZBM/m1vxRA6VMCDypzk=; b=H+aw58sPvatws9Obkka3A+NFVJbtWXseZY9U4Yrlbu2jPHwm+Qg53N7t5S2fDejtfx HvvwLNqM5vs5jQHM0Z2rL36dfNRmwsMc6Ps8IxBRA3xfZhhsuzj2f/glOaGHopfIp1qi wndvrkQI/z7wcPc+6gKwh14scsWaJ1nhcR1U05nJTu0XyD8DD7usTjYpVwNcDUoqQUeq glW19Sc5wreNqKAnvuOtjDyTFTMRq1/irtw0FbHsskuNg/nVor2gq/oiLBDF/QbvxMU+ onaWGPoeLGF3p26U56105fuyWqkZ7OF0VU79d7yYZb0GSugxosxmmeJ7PaFpJlJ9Vvly /slA== X-Gm-Message-State: AOAM5336EuTrEZcTTjI0KZqSnhAsi1eCGPUV8JXLlCg2e1oNgNMyyi6Z IktuADB2KyS+Qvy/OkDChJ8i4PVcTZ0= X-Received: by 2002:a37:a7c1:: with SMTP id q184mr1880618qke.382.1642038998596; Wed, 12 Jan 2022 17:56:38 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id t11sm906506qkm.77.2022.01.12.17.56.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:56:38 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:55:53 -0300 Message-Id: <20220113015612.448-12-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 100/281] mpc8: 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: imXjGy5fcXDg From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavformat/mpc8.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index 0cf46b36a0..c5f05e08a2 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -230,6 +230,7 @@ static int mpc8_read_header(AVFormatContext *s) AVIOContext *pb = s->pb; AVStream *st; int tag = 0, ret; + int channels; int64_t size, pos; c->header_pos = avio_tell(pb); @@ -273,7 +274,9 @@ static int mpc8_read_header(AVFormatContext *s) if ((ret = ff_get_extradata(s, st->codecpar, pb, 2)) < 0) return ret; - st->codecpar->channels = (st->codecpar->extradata[1] >> 4) + 1; + channels = (st->codecpar->extradata[1] >> 4) + 1; + st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + st->codecpar->ch_layout.nb_channels = channels; st->codecpar->sample_rate = mpc8_rate[st->codecpar->extradata[0] >> 5]; avpriv_set_pts_info(st, 64, 1152 << (st->codecpar->extradata[1]&3)*2, st->codecpar->sample_rate); st->start_time = 0;