From patchwork Sun Mar 20 20:15:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 34869 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:ed11:0:0:0:0 with SMTP id hi17csp1134724nkc; Sun, 20 Mar 2022 13:16:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhyHgbcc5+60yxMIdMlMnfpcw+8FVutZ2RcYcYW5mOrDTdOiknAgyZ2oC1oghX7eqJ5Q3l X-Received: by 2002:a17:906:7210:b0:6d6:7881:1483 with SMTP id m16-20020a170906721000b006d678811483mr17770401ejk.227.1647807375974; Sun, 20 Mar 2022 13:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647807375; cv=none; d=google.com; s=arc-20160816; b=O4qnd7/tBo2XnX261UTlgXNR3kYEPB9zYsKfUB5EEIrgf8ufnXqyeUszghuGgSYfBD R/E/Aa9qW8HvQdGrR74rVCur1UAVcUmQuRV3Cr+yELR5/DoYT9Hw8zg+JrWcydgCLZip NqQInr+FNtsLb4FKTUN8Qxpzs1MFid/6MqbRFy5Cq347lLL3ShTIgexSOI+56olr2aoL cwpqbVbq0Fti4COMbRgQ/+LUT6acIpUapS3wpJfMNSlz8YtyFOOah2qMSv8CIwqECojM 1ALjV0qBvivPuUn0grbPVAeKqpoEOUXF4QkooaDKpBL8oKtrsApTRRvwBcvABzi2Q7hW JiDQ== 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=M8Msc27JooLrfq1x8AqtBVSKVnopCPK57ct5bGvkqhM=; b=faPmbez5HNsnOXvif1gbHY7pkOLVGfM4X+ihl253tbziDJIgV9Z0EaZsp/tY9XHBbx I3R1JMn06V7LLJFNjqfnBkmS6khhRtwskJwE4MvFruLrsqDaR3RKE3xE1VgJt0qJgMoe h594mSwy30ZiWLxsfgpqT5CVHaJchULgKYA/0arLFb6i1Vgj5IopQEdHUuE0wpkbTPpL cUiF60VYT3PQSWoIYGqiamH/j0A2DqYPbiuhb6FjSfuFrI6v7fCzBokyNX5rnEZcsGO/ k3qXz2G5NXw25KK1A69JUeXUMgEtnBvH+yHPZzn38vnTXNQ3lW0GYa+hi1qDHXE7x32d QCZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="GYnT5/D0"; 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 p15-20020a17090664cf00b006df76385c43si5334141ejn.227.2022.03.20.13.16.15; Sun, 20 Mar 2022 13:16:15 -0700 (PDT) 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="GYnT5/D0"; 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 7C9E9680867; Sun, 20 Mar 2022 22:16:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 808EE680867 for ; Sun, 20 Mar 2022 22:16:05 +0200 (EET) Received: by mail-oi1-f179.google.com with SMTP id e4so11354606oif.2 for ; Sun, 20 Mar 2022 13:16:05 -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=NR0lnvKjDgbliZW98hnkaQAiuL01EUzVBt4/j8ZhK9s=; b=GYnT5/D0TGh9HTVLHgiLTJMnr4atssdx6xqWRSUShMWYUwO29qTF9f84zdPcSZj4KF cyBvO9Pc13nfS1SgYaJZ0EYAQ15TOOajqM3qIcIUZU6koEe3eNnbDvlftDhOkFbrtGPB 6ocLIiRHXkeg/XnyWYV2zoPgZwK1jRIXjYlyOfxpUAIt9f9T8iVg+G3i6A4X8oXqgNX6 YucTdLY+yvSvgt8vUbT813gAcU0jWgDM6Ka3/DmAeIjm6SrSVK/AHNrNBhn/jYERw44a qqTh3En42di+i6eYyT6cnZnn0re6GFjQ0Px6TDrunhNiqiuR9tO2PX2fHDoOVO3QgQKU k/Hw== 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=NR0lnvKjDgbliZW98hnkaQAiuL01EUzVBt4/j8ZhK9s=; b=4kQD0WIEoHFhMr7pAJFq9M9z2+wyGxj9Ym+AibNn2L51KzuGme96G5kAKthNF0xhw4 JjxubzoXevf91r4kPERk+Eun6ZPOuv+RStaunXLHv9TriCR0w09ruTVSlbgk5a4V22yw hVpw+4qoVo4mqwAXGFU8/MIVKehrj3jovoENv4X04J7oKf0GwOLvq1X9lBPJ0CEU48Cr 0aLc+lNC3RV7/C978Kj0IYRa6TcVWtjsn6pYuHkg+LQvLA8Py9qNxAuVv7IXBf9Il3h7 xZmJ4dbeqEdSShx4hb6FZiEIUXfO8aoXeXwsNYxnE/8TgM0F2IyWoZAK0guGy/LnGIod z05w== X-Gm-Message-State: AOAM5329jLsLQAOYB5dRgN2xpCC61JK0/WUnn1seb3kg5dnMtf5P+UOz CsVUDqYzLEHxIwM9sDYTHaIC9MofpmicWQ== X-Received: by 2002:a05:6808:10c9:b0:2d9:a01a:48ae with SMTP id s9-20020a05680810c900b002d9a01a48aemr12526146ois.249.1647807363313; Sun, 20 Mar 2022 13:16:03 -0700 (PDT) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id 38-20020a9d0da9000000b005cb437ac0e2sm3956470ots.44.2022.03.20.13.16.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Mar 2022 13:16:02 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 20 Mar 2022 17:15:23 -0300 Message-Id: <20220320201523.51516-1-jamrial@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 7/7] ffmpeg: make the ac option set the demuxer's ch_layout AVOption 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: uWHwbtqgK5pg channels is deprecated on all supported raw demuxers. Signed-off-by: James Almer --- fftools/ffmpeg_opt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 720a3cc46a..213a34eadc 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1122,7 +1122,9 @@ static int open_input_file(OptionsContext *o, const char *filename) if (file_iformat && (priv_class = file_iformat->priv_class) && av_opt_find(&priv_class, "channels", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)) { - av_dict_set_int(&o->g->format_opts, "channels", o->audio_channels[o->nb_audio_channels - 1].u.i, 0); + char buf[32] = ""; + av_strlcatf(buf, sizeof(buf), "%dC", o->audio_channels[o->nb_audio_channels - 1].u.i); + av_dict_set(&o->g->format_opts, "ch_layout", buf, 0); } } if (o->nb_audio_ch_layouts) {