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 8257142D6A for ; Thu, 13 Jan 2022 02:10:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 244EC68B21B; Thu, 13 Jan 2022 03:53:49 +0200 (EET) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9768468B211 for ; Thu, 13 Jan 2022 03:53:46 +0200 (EET) Received: by mail-qt1-f179.google.com with SMTP id c10so5368272qte.2 for ; Wed, 12 Jan 2022 17:53:46 -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=FLMMEaseBQ0ldlNz+ZPCfMxSypYe5/Vm9tTBiQVlsl0=; b=e55vHuJVCQuW+U24Sb6wBQ2V1lFCBZLSvIjahCFXfpZj9QzLbintcpfiKaQm1++G79 VnRXWxQ+diGmai5CnXkferVQye208YOYpUyr6C+wxd2ik+b3rEDL7BG2GpQXDb8M4SGH HGA7ylf6sCqaSzcMQOClz8dYWsMCrjhsZMRJt9qPsBun69orIfKwHAGCkFO/IxbcYTQB 6PKaDSyIo0pj8+5dnIObqGVivyLZXWXqY6bCl2YNkk6mKkvrMlGugTlyFWLIrZIORnCe rTTElRjgJeuaUCwIiqWWx3pxyyakM0C48WaPD2hKQ+bfBIvOCXuPDepSCc3XFLw0koIq ZZEA== 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=FLMMEaseBQ0ldlNz+ZPCfMxSypYe5/Vm9tTBiQVlsl0=; b=Zm1ZZ8kgmH/9gcPHUHlHV69kmS4OPbOnPgCbxBfuinE8adNAtVQnttsdLLkBEq00ec Je746pyY3BKKoSOCHnh7ph9BF2vO8rI62LMsn/UYTRlCwIQ9DD9vGvol6bm9WISKViYV CGS4gpGDtPDxWRQ1kqStBuhbAXQR3TVG6a7lw3ZHuHxN0hVWHKWC7z91N49pXl9F1Ege sx1SXimcA1t69oR5xdA4Q5Au/TathHOpGVh1/yWnE6W9I7uS4+rLptBgxOiZe8vRjUb0 oZu7crRVoU8sewaXxDuaaOxzB4OeSKkWO6l24jynZ3+yng28f9pIU/nO/wFxA7EoRszK L7hQ== X-Gm-Message-State: AOAM531+2ojFTpliDuIqHWikchfpk2Muw66MhmjLaw2FDbJR35jZxOHm 3QUZJW99GP4DhLBnhqtwjsTwYTxNS5c= X-Google-Smtp-Source: ABdhPJwJ+dxU4qMcdw58oVShxrMV28Y9coNl6JqQR6OIWLROXVhReLn3IxQLjLRI/DRG+Oyi1MANFg== X-Received: by 2002:a05:622a:653:: with SMTP id a19mr71840qtb.166.1642038825195; Wed, 12 Jan 2022 17:53:45 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id i21sm1204710qti.31.2022.01.12.17.53.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:53:44 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:50:49 -0300 Message-Id: <20220113015101.4-88-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 087/281] avdevice/lavfi: 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: Signed-off-by: James Almer --- libavdevice/lavfi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index 710ad7c530..fdb93b835f 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -332,9 +332,12 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) st ->sample_aspect_ratio = par->sample_aspect_ratio = av_buffersink_get_sample_aspect_ratio(sink); } else if (par->codec_type == AVMEDIA_TYPE_AUDIO) { - par->channels = av_buffersink_get_channels(sink); par->sample_rate = av_buffersink_get_sample_rate(sink); - par->channel_layout = av_buffersink_get_channel_layout(sink); + ret = av_channel_layout_from_mask(&par->ch_layout, av_buffersink_get_channel_layout(sink)); + if (ret < 0) { + par->ch_layout.nb_channels = av_buffersink_get_channels(sink); + par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + } par->format = av_buffersink_get_format(sink); par->codec_id = av_get_pcm_codec(par->format, -1); if (par->codec_id == AV_CODEC_ID_NONE) -- 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".