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 5807B42F92 for ; Thu, 13 Jan 2022 02:48:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CE48368B9EE; Thu, 13 Jan 2022 04:07:51 +0200 (EET) Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1095668B9E3 for ; Thu, 13 Jan 2022 04:07:49 +0200 (EET) Received: by mail-qv1-f43.google.com with SMTP id hu2so5109961qvb.8 for ; Wed, 12 Jan 2022 18:07:49 -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=Fx9eC7EcTXkhOlBpEOLPj964PgwT56OZnNm5o8y2uQk=; b=Z+ZvF6cNpIP/IBxMlMhF9gZIdLD3wY4Sde5QFZ2GPGN3LIFNZY+Ji6jEruwlypTkxT FrEWUUGCtbsb2Yus6kGBE8EEHOkUHL8yHvRBNc4dmP3ZivzMbofBLSS0uimXc+CaIUfm A3wnzz18Wi1I57eEpolUKS7yXghOT9pDDMp1FzfVgGWsSpvqQHBwyNlJ7jUoP6kyC5eJ L9V/wZq9sM9pZSbK0383yMw0DmsWW0zEIV3N3MnW5G9cGVq8FgJg/I3KK3crZFDh7w5i 8jFtaefULeazTqmhAhpRST+SJLrF5RMzLfxRUiG+vtTXnxdQIhL/1xujURJaT634ZoLe XWfw== 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=Fx9eC7EcTXkhOlBpEOLPj964PgwT56OZnNm5o8y2uQk=; b=3hkXMX06kbnEBvJ4OVaSZ4rZhF09eSk3YDuw0YeusmusHFDeovneb8pLRoeRBwA035 bDmZbwFsoSyU5F2vV/woOl9MxbwuZQq13W92KL1KUvx1UY4A5ufGDC2mdRGjKNjTbrVS gcTJHt+mBM15ROnkWnj+IP8mt7xubYZeANVJy5aUmR5Waw30M4QzkdHegDCk27pr5dbZ PG2v/CXdqIAhrBqarGMrtHz4CAFrjZSTnb5kiAiiW/oivnvokyZeIXo/3h/EHGCfu++l 8g0J7kdlUtagvKiot7ei3LLl3r3fVB4bITxzmb9HVpp1PxEgRZgcF/UQ2Z2EeKfPegXY os5A== X-Gm-Message-State: AOAM532hzdowigqlLCKo/Z31yQgIKktnSEN8Op38vPi3e3mEBMjCex2M El+Fb3QI3fUychgSn40PV3lP7sUdxK4= X-Google-Smtp-Source: ABdhPJw20G9q4Ka3sKfeej3S/rrMDMoL0PdAvBWp9w1L1gAf8SHXUAHC/9QtqUTL5bU+SOmpPAUAqg== X-Received: by 2002:a05:6214:29c9:: with SMTP id gh9mr2375568qvb.50.1642039668450; Wed, 12 Jan 2022 18:07:48 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id a16sm1085946qta.13.2022.01.12.18.07.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:07:47 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:07:00 -0300 Message-Id: <20220113020713.801-17-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 256/281] shorten: 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 --- libavcodec/shorten.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index fde5c4b982..6cce675c9f 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -428,7 +428,11 @@ static int read_header(ShortenContext *s) s->channels = 0; return AVERROR_INVALIDDATA; } - s->avctx->channels = s->channels; + if (s->avctx->ch_layout.nb_channels != s->channels) { + av_channel_layout_uninit(&s->avctx->ch_layout); + s->avctx->ch_layout.nb_channels = s->channels; + s->avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + } /* get blocksize if version > 0 */ if (s->version > 0) { -- 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".