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 8A63E42F40 for ; Thu, 13 Jan 2022 02:46:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5CF5E68B9AC; Thu, 13 Jan 2022 04:07:43 +0200 (EET) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E44CE68B98E for ; Thu, 13 Jan 2022 04:07:39 +0200 (EET) Received: by mail-qv1-f47.google.com with SMTP id q4so5114427qvh.9 for ; Wed, 12 Jan 2022 18:07: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=iCY1j/a+58iaFIL9n5I3NKue8X+mtAsuDg4UKwqwuo4=; b=EfsQC2yhE4FQFmtSS9yCWepL55gZ3QQk4vcUkGxbM0qNBcyyPqkPdeU75qiSQaVvog a0CZQB1rryIE+Dq56wi9sFoHKklbtmy929//jzO7X4Yv7fWC2iY6aD+XrC0Grh5wbcYK BciHxq/9lTuc0/HYB/dpOtFfJ8xtusU20L7XqSgP4JGGyyvq4sTEELnozYzMiR5oWMJS Aq1hGYfB8JFh5feJRAV5dn+CQ5ZIxTv1ncGzxEEucv8WBhqbgl7rTRgBTnQif9ZWtueZ 9yUNevUYN2hhfICGfp07e4/OsH9U/EIeVxXWI6ZDvh9WFWghfu0GH+a2zoNkm9XmXiim bUrA== 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=iCY1j/a+58iaFIL9n5I3NKue8X+mtAsuDg4UKwqwuo4=; b=HRDfz3ttdRwVAKewInQo0TppJb+D35Z2fjSVTetOpSNSm+VRXBPSH6SO5Uomp26FSt kdGMWn9PXCJlwAjNvK0RuqJtFFNzbBcMckurcDqjLOjUDAj+UBuTftXXJUf5+XiwI9b4 77HW65/7eaCYE0pF7g4lTBq1J7vGxfUVoiAWDNwYJSWdhhPpwkzPugLaG3rhJ2BRGfCP 72Wh4l0F9zuBuQh1/U3KqX+A3iJc16OqljuEIs6fZhQqaJnGRKM7YCRbhDwbCGgFJwBe /UoxkrncfnHxTeeeIvvUuJg9FjBWD9eHl44atYy4F/KLibenVoX8sFL2I+xQItzpnNls 2XUA== X-Gm-Message-State: AOAM531XPEBCzu+N7jI28dpcuozMQa1vLNp2YQ+yRrgQcn+ADCP8A/EZ zIq/scDDH85OUm+t8kn+RFQ0VLgbNaU= X-Google-Smtp-Source: ABdhPJxumpXb/IsmMaSoBzlBy6pvmvhqkg8pcyc1UcpUF8gDkZIjc7/p3W383GSunruOR7pLkxiCvg== X-Received: by 2002:ad4:5fcf:: with SMTP id jq15mr2121906qvb.0.1642039658302; Wed, 12 Jan 2022 18:07:38 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id a16sm1085946qta.13.2022.01.12.18.07.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:07:37 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:06:53 -0300 Message-Id: <20220113020713.801-10-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 249/281] qdm2: 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: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/qdm2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 5e4e741e59..de68e651cd 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -1687,13 +1687,13 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx) bytestream2_skip(&gb, 4); - avctx->channels = s->nb_channels = s->channels = bytestream2_get_be32(&gb); + s->nb_channels = s->channels = bytestream2_get_be32(&gb); if (s->channels <= 0 || s->channels > MPA_MAX_CHANNELS) { av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n"); return AVERROR_INVALIDDATA; } - avctx->channel_layout = avctx->channels == 2 ? AV_CH_LAYOUT_STEREO : - AV_CH_LAYOUT_MONO; + av_channel_layout_uninit(&avctx->ch_layout); + av_channel_layout_default(&avctx->ch_layout, s->channels); avctx->sample_rate = bytestream2_get_be32(&gb); avctx->bit_rate = bytestream2_get_be32(&gb); -- 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".