From patchwork Wed Dec 8 01:06:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 32126 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp7045951iog; Tue, 7 Dec 2021 17:10:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOF2AVKtCj9fiGFFQDf2ULK+r/bSqGUQfMLwP+f9ywKNdulwRtK7a0uw4tyyzXr2Hc7hbx X-Received: by 2002:a05:6402:1d50:: with SMTP id dz16mr14207734edb.385.1638925843836; Tue, 07 Dec 2021 17:10:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638925843; cv=none; d=google.com; s=arc-20160816; b=cjuh/4MPJQzTdAFaUUKLKRJUCEWhpczQXz22CWJOjO2OSv2jmhXX47Rl/z/3TUU0Bm afcVA0cNULN9HT3DHTLPQH0BvIIfuuTMwlt5O2Jg99pZMXtPeLyXOjb7NALlAfE/oe5x BxhDKuLDPnTeOV1ewwfDsBIU5tda7T9pjwjvzqVx2R9f3Ne74dw6i7C6zQbxSOI1wyjS CTAecm4XDkvsS0a+owVX5iqt8EL9/WPiJjhlw0AGrhA4Yhr+Ou0ulZYLLmLOZL+xduIS 7HvcImoePukYgAjdecUpfBS544xvnUl4mvdqEHNoSFxC3WtKW5szZs2vn027cKhFnQjS 6FUg== 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=JdXndZpMKSChb5+CbXtcgyi9lpKOW/g/UFthacisf14=; b=KI4C773hm5eEgCfld67HrVW5T3exkUxx8EseteVoHG/YnstGUbixM1Sj0uuC7qfmYS PIzvt9V5J7DN6eqLHa8eYI/Neg3ON7ca/MBb7SuvfTf+uJJWxKxpH2mdZV5HyBTuc1xj 17CbVNUkqo/YeWs0hsgQox3CCOfGeMaO7Wcqld9dN4rgzbjTDZRkSqMDCtGXwOY19aTA JyTm3L4Ot2UiGqFmlALqWkCq+vHsI6LJPD/Hz8xz1NxbB1X2zy7uTCqQyvhByfmM20mj DqLd0/oDI+Ic9gFqy7+GhCWYmNJ+ymDVAa6BOOJaFaKsOC9ODgU5Ew9i5yFi68NRFmVQ ntQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=cmVvUIyd; 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 z2si2019524ejm.238.2021.12.07.17.10.43; Tue, 07 Dec 2021 17:10:43 -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=cmVvUIyd; 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 1792068AF1F; Wed, 8 Dec 2021 03:07:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-vk1-f170.google.com (mail-vk1-f170.google.com [209.85.221.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5B49D680CAB for ; Wed, 8 Dec 2021 03:07:50 +0200 (EET) Received: by mail-vk1-f170.google.com with SMTP id b192so580650vkf.3 for ; Tue, 07 Dec 2021 17:07:50 -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=t4mBm8ctmuIcixitD3zxDjPKRV31dAKCz5+lkQCxvQ0=; b=cmVvUIyd5KQrC5rrty6ikxV7iKMR+9u5TgHLWi/JM1lbcdznZTNBoEDmcuKPMIN2JR F6koLNsKoNOlsUSz7BQ/KfjFVobcmTZjAIiZOpfNWHRzY9gRen6k+nY9XazGUHktNfN4 awkkI2PdXelB/BYT0286JFp5r96oI9QuLBo65vxZ50c/qNArmw9c27VRzNhSaNuKCEN3 MgPh8nxWqSmR8ydP2gHc63QRZiG/FNgllK6lvboTiqyRQA2EVXhmEL/0edHTORFohBI4 D82+Qx4t0txQFyAwviAl3wYw8w5XJdv5Rb+3ey5sg1/J0fIYWrUgbqyJYVN/lKB12CfO g38Q== 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=t4mBm8ctmuIcixitD3zxDjPKRV31dAKCz5+lkQCxvQ0=; b=woOOYCUGf+jPD87POuN2wIBw3noFL0qyVE3v6ZlIvLzwCmBRAzgD22WSteuZwjQnL7 OqQKEam5gYxUZ2tH4B/0Dk30ZllUHxGoQK9EYowpPCBTqNEssoN/UsAOQe5H4kp6oR/8 xg7kLWMJVK4UPnb9Pw9FTwGLxjY/PPHB4RdrUYuQk06iO9fJik/Xa2jE95ELqtEKQVy2 ZNgqTEBQrLJ6fH8l36giE1npbk4Sp8OfdTWeNB+qBHpqS0JpKnw9d282D/6DC4P9XpSS YJzGWEZqGTqfTGNDvp7PdKJHhnTCsv0Qssz0qsOQbeltISBY54XxSAaCS3ITArduoRjW G4Ow== X-Gm-Message-State: AOAM531IogOKCMqFOh1YrLXD8zHR9dt96VFuSrXndTr62L8KlV2jGfXE iKjIWJEOHWzIuwPKeywj9oi3aHLzMAYH9S8A X-Received: by 2002:a05:6122:d09:: with SMTP id az9mr58783798vkb.23.1638925668920; Tue, 07 Dec 2021 17:07:48 -0800 (PST) Received: from localhost.localdomain ([181.170.250.138]) by smtp.gmail.com with ESMTPSA id b8sm949898vsl.19.2021.12.07.17.07.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 17:07:48 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 7 Dec 2021 22:06:33 -0300 Message-Id: <20211208010649.381-18-jamrial@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211208010649.381-1-jamrial@gmail.com> References: <20211208010649.381-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 178/279] lavf: drop the channel layout compat layer for old-style (de)muxers 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: RG6TWUB6UEHo From: Anton Khirnov All the (de)muxers have been converted to the new API. Signed-off-by: James Almer --- libavformat/demux.c | 12 ------------ libavformat/mux.c | 9 --------- 2 files changed, 21 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index 3bfd753f64..a9670aeb34 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -194,18 +194,6 @@ static int update_stream_avctx(AVFormatContext *s) sti->parser = NULL; } - /* if the demuxer exports old channel layouts, convert it to new */ - if (!st->codecpar->ch_layout.nb_channels && - st->codecpar->channels) { - if (st->codecpar->channel_layout) { - av_channel_layout_from_mask(&st->codecpar->ch_layout, - st->codecpar->channel_layout); - } else { - st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; - st->codecpar->ch_layout.nb_channels = st->codecpar->channels; - } - } - #if FF_API_OLD_CHANNEL_LAYOUT FF_DISABLE_DEPRECATION_WARNINGS if (st->codecpar->ch_layout.nb_channels && diff --git a/libavformat/mux.c b/libavformat/mux.c index 9dd6b13ac8..510ede21db 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -273,15 +273,6 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options) goto fail; } - /* if the new-style channel layout is set, convert it to old one - * for old-style muxers */ - if (par->ch_layout.nb_channels && - !par->channels) { - par->channels = par->ch_layout.nb_channels; - par->channel_layout = par->ch_layout.order == AV_CHANNEL_ORDER_NATIVE ? - par->ch_layout.u.mask : 0; - } - #if FF_API_OLD_CHANNEL_LAYOUT FF_DISABLE_DEPRECATION_WARNINGS /* if the caller is using the deprecated channel layout API,