From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3F14A42CF8 for ; Thu, 13 Jan 2022 02:01:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 978C168B0AF; Thu, 13 Jan 2022 03:53:01 +0200 (EET) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3806568B0A6 for ; Thu, 13 Jan 2022 03:52:53 +0200 (EET) Received: by mail-qv1-f54.google.com with SMTP id l13so3581066qvz.10 for ; Wed, 12 Jan 2022 17:52:53 -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=Jr8/1Fj8pyX3LDeFg7AtlNGHH/zb4kUoFB0JMUelvzU=; b=g04v/kXf4ja48wrpPqpSkA45iU9piIc1YFn731IJKygDtjrepRehubiDzignlOTHGV 8BzXuEM5HyCaGK3LRJNtPzS3DOJngp592HkOi5idDXEBbRViwbok3uUy4O7GN1nr7CK+ 8lzu6ceq4uP5xp7U4fkxC/ol1xB5L6ONbkPQeqvP38zzp0PaTf2kvja3uO3CUSNRR+zd Sm/X1BO4RPX+YVHzhzqOr93xY2Ei1kyjMKlhkx6w83Wv/sDCNw58jAOobRgTjhlJm/tK a5upPI3aMTrRF4F9o3goo0OPkD2NTatWfFJYcqqc/V6RB5Lev4GhEpsFG5N57tJ7K9ER coPQ== 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=Jr8/1Fj8pyX3LDeFg7AtlNGHH/zb4kUoFB0JMUelvzU=; b=FaKBRuEs+pTwSZQ1yhD59n1RM504bbU2b2bHiabX2I/UK/LX3PdVcJMN+ZoSwIFr75 cxTwlU6epbpw/qO9T1RvHoGoTWsGZlRGrYiLJzJLYnY6R+5Khd3MJ63wDehl8jV0yskk FsMJjoiyu5JOGjKm8ap4BtVPk9YNrm8HFHyavWi+oRTXoHU31Xjo53HC5FV2H5AQo7d6 dHbnnblS/MzSF888MluqZ3IcEzzOCBv2LLyWA7ET2pKWL81StIWm6dwKadxFLEeuoOSe GHtD8r9+lVmy5Fq8S7lNk7gj1OgP/V3B6/h/SXSmGxpQxhdIDacSNOV/d8m3je9w2Y0d 0HWA== X-Gm-Message-State: AOAM531Eh2fZe5cOOcBxLpAFdSfUvCPglAWQcxoi/xqfdYsSbG3ZXcZV z7nPyFrW8Uk/RrLrke9driVzDJofC9M= X-Google-Smtp-Source: ABdhPJz9UgLQX9zHXVPARuKbEIdShJ3Vg750Gfajw3TMSgfBbN0PVISXSG373Roz8f5ZC1tJQ7EREg== X-Received: by 2002:ad4:5964:: with SMTP id eq4mr2249095qvb.109.1642038771901; Wed, 12 Jan 2022 17:52:51 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id i21sm1204710qti.31.2022.01.12.17.52.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:52:51 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:50:05 -0300 Message-Id: <20220113015101.4-44-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 043/281] cdxl: 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavformat/cdxl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c index c42e0d3545..76dc1d18c9 100644 --- a/libavformat/cdxl.c +++ b/libavformat/cdxl.c @@ -171,6 +171,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) if (cdxl->read_chunk && audio_size) { if (cdxl->audio_stream_index == -1) { + int channels = !!(cdxl->header[1] & 0x10) + 1; AVStream *st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -178,8 +179,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_tag = 0; st->codecpar->codec_id = AV_CODEC_ID_PCM_S8_PLANAR; - st->codecpar->channels = channels; - st->codecpar->channel_layout = channels == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; + av_channel_layout_default(&st->codecpar->ch_layout, channels); st->codecpar->sample_rate= cdxl->srate; st->start_time = 0; cdxl->audio_stream_index = st->index; -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".