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 70DED402A1 for ; Sun, 20 Mar 2022 19:37:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9032568B11B; Sun, 20 Mar 2022 21:37:26 +0200 (EET) Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9413568B0A2 for ; Sun, 20 Mar 2022 21:37:19 +0200 (EET) Received: by mail-ot1-f41.google.com with SMTP id x8-20020a9d6288000000b005b22c373759so9273720otk.8 for ; Sun, 20 Mar 2022 12:37:19 -0700 (PDT) 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=NXhviNEWF4Jh5ciSSTfBV8PJ2tYQPCQUJ+8XI7kji44=; b=asbtCjg7HeZOr21BJLjRUfPuiHviuZt3gu51lrFGNSvodGNlKKZGmnEUtrDv3TZk9w d53feFxiwlpU3L2aqowxo6h53nnchcTZRMQ9ZZDVk7ngH1rjYGPIyAEtwgD4ucIvafkC fbehuqifA4qkj4hdiT519PnNVDM17SNveiIs2yjcSOSTm/epNFxDt1ajKMiHI68mE4Gk zyDRjGS484qX3GKUe/eHufwgcYSyhli0AaKlAEqul9f/Ofkj49hwU89vYao0UM3dyetb QALew2wQ/x0pr4extU9/tPlFBNoJOBVEiG/pBoLdDIosJY6la0SC9Gw0qlPgIqamLPok mybg== 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=NXhviNEWF4Jh5ciSSTfBV8PJ2tYQPCQUJ+8XI7kji44=; b=UYQwFKPo5zWbEEs5OWpBIULEJFPhlAHMruv9e3pyw98m5d/R5XgNgVaHz42ygu+qox va6nM28K8xoxcqsPH4ENLJegK1uueD56XO1knf2SY4IlGdo06Emb53vIkgiRlWYFODwf gaSl+T+9dqcJggKIGJs5zIBQjcJqHMgu9LT5n1BYVIVq+IGI3ohT4ClPCljjCE79zv17 GCN4PRGGvJLck/dL/7lWhVDiwDWsiAFCNcSAjmad31MhXfR7+zkMOY19JLXcxtOaRdr6 oyh4QCf/DnxvjT4gd6OByjI/0Y0S+ErE+mB+MlpDwC0aJG79L77aute7LhOqpC/Qb88Y yJ3w== X-Gm-Message-State: AOAM531efZxRoT0eIrQN9jdSmhDG0PNJzy3ii2jQT1hSucz1koQ0+fiS aemZz3l4V7dLyE1TC1JwJpTU8keJFuJubA== X-Google-Smtp-Source: ABdhPJxXcyNt8QATcdhDhgLqemJwVPF44LlvMQR5kl/NyuteQGQXUBEwWF8cuSlYuoHkexerLjebYg== X-Received: by 2002:a9d:7156:0:b0:5b2:359b:c907 with SMTP id y22-20020a9d7156000000b005b2359bc907mr6904594otj.116.1647805037549; Sun, 20 Mar 2022 12:37:17 -0700 (PDT) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id y15-20020a056870b00f00b000d75f1d9b81sm5418483oae.46.2022.03.20.12.37.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Mar 2022 12:37:17 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 20 Mar 2022 16:36:14 -0300 Message-Id: <20220320193619.51185-2-jamrial@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220320193619.51185-1-jamrial@gmail.com> References: <20220320193619.51185-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7 v2] avformat/pcmdec: add support to set channel layout in sln demuxer 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: Deprecate the channels option, and ensure ch_layout has priority if set over channels, until the latter is gone. Signed-off-by: James Almer --- libavformat/pcmdec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c index 962faad4a7..be45188999 100644 --- a/libavformat/pcmdec.c +++ b/libavformat/pcmdec.c @@ -180,7 +180,12 @@ PCMDEF(vidc, "PCM Archimedes VIDC", NULL, VIDC) #if CONFIG_SLN_DEMUXER static const AVOption sln_options[] = { { "sample_rate", "", offsetof(PCMAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 8000}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, - { "channels", "", offsetof(PCMAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, +#if FF_API_OLD_CHANNEL_LAYOUT + { "channels", "", offsetof(PCMAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_DEPRECATED }, + { "ch_layout", "", offsetof(PCMAudioDemuxerContext, ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = NULL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM }, +#else + { "ch_layout", "", offsetof(PCMAudioDemuxerContext, ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = "mono"}, 0, 0, AV_OPT_FLAG_DECODING_PARAM }, +#endif { NULL }, }; -- 2.35.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".