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 00CB242D6E for ; Thu, 13 Jan 2022 02:16:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3942268B2CB; Thu, 13 Jan 2022 03:56:56 +0200 (EET) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 498F168B2C8 for ; Thu, 13 Jan 2022 03:56:53 +0200 (EET) Received: by mail-qk1-f169.google.com with SMTP id 193so4865792qkh.13 for ; Wed, 12 Jan 2022 17:56: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=2pxTceg9foe9YS68g0Wjx9RLmvo/aK++5XKBt6Ulhzs=; b=DV8p7kA4GAsDbha1loaeIX0b1Zjn+5H9IdTomtEiW+JuECHsX1AVntcNPY9Cj4e79a vo0uu+y+lwGf0o+Un1TAhFwN5OeE+bgtmkEjXMpfE9/bNSltfEh8H2iHtJg+/PKM9WN+ g2ljD5JIKuOfLzFFlDZ1Tpc4J4WFbMQUiIl1XKHRpBkvnrIrF/Dyc3g0eUAEmEES1E82 QcoQpIRZLgV5u54dE6AABYcV31uf0br+qY/Lwt1vLI5WJmYjMfEqXSlkdE5JJJzdRBVs KapLcrkbftR4nga5n+8gOGV3SuSgA/QaTzhwkuUW1XDJrFsQ0ouTkuJSkS7IDsulhKLV WtBA== 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=2pxTceg9foe9YS68g0Wjx9RLmvo/aK++5XKBt6Ulhzs=; b=UzC71jt4DpQr51tCliX/SobQdG1qJ/DQjhOACtjG7wN0r2MTb6uuCBgBRMql1dGatB G5DAG5O8t8B24KlMT383Sd3giTePiXtFruiDuL7xIUUnKYPHGk5dgL+z8LNfxZCf2DNC ctfqXBPnLHyZ7+D2z1PPmmoSu8Z9Ny+NZpJkEGgymiAnuF1DkrkO6XpmqE1Zz7hYmZcO xSaUCf7NxqVN09iu7c+k3BN6z+p7u0MEhfikf5MipAr/wYUGFgNg4JJjqdGPdGP9xGt9 utl4/Amvi6zDhHHtlItQAocweNZ2FlrNnF/s5/QD9ZqDHGqb1BWYaK9rM+3y6qGidnBw 4hBA== X-Gm-Message-State: AOAM533LLexP9Yjef2lblqkbh99FueyF+ijc2Cdv1tyvkvdNYpqTjaxE 41bvAl3agN4SW+sQ4+Jx8j/vbmbkZko= X-Google-Smtp-Source: ABdhPJwrZC/+Eh041miV8bTuULz8kCNQX/8C5hCjRcb+Zhtxow+IUNoAOAL8dlcUoHrSnAyLLqUW6w== X-Received: by 2002:a37:b13:: with SMTP id 19mr1195342qkl.443.1642039011880; Wed, 12 Jan 2022 17:56:51 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id t11sm906506qkm.77.2022.01.12.17.56.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:56:51 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:56:04 -0300 Message-Id: <20220113015612.448-23-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 111/281] nistspheredec: 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: Anton Khirnov Signed-off-by: James Almer --- libavformat/nistspheredec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c index b606ce72aa..43b7d9bc47 100644 --- a/libavformat/nistspheredec.c +++ b/libavformat/nistspheredec.c @@ -80,7 +80,8 @@ static int nist_read_header(AVFormatContext *s) avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); - st->codecpar->block_align = st->codecpar->bits_per_coded_sample * st->codecpar->channels / 8; + st->codecpar->block_align = st->codecpar->bits_per_coded_sample * + st->codecpar->ch_layout.nb_channels / 8; if (avio_tell(s->pb) > header_size) return AVERROR_INVALIDDATA; @@ -89,8 +90,9 @@ static int nist_read_header(AVFormatContext *s) return 0; } else if (!memcmp(buffer, "channel_count", 13)) { - sscanf(buffer, "%*s %*s %u", &st->codecpar->channels); - if (st->codecpar->channels <= 0 || st->codecpar->channels > INT16_MAX) + st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + sscanf(buffer, "%*s %*s %u", &st->codecpar->ch_layout.nb_channels); + if (st->codecpar->ch_layout.nb_channels <= 0 || st->codecpar->ch_layout.nb_channels > INT16_MAX) return AVERROR_INVALIDDATA; } else if (!memcmp(buffer, "sample_byte_format", 18)) { sscanf(buffer, "%*s %*s %31s", format); -- 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".