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 CA4CC42FCB for ; Thu, 13 Jan 2022 02:52:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 760D968BA9F; Thu, 13 Jan 2022 04:09:41 +0200 (EET) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 271BA68BA7F for ; Thu, 13 Jan 2022 04:09:37 +0200 (EET) Received: by mail-qv1-f41.google.com with SMTP id a8so5182736qvx.2 for ; Wed, 12 Jan 2022 18:09:37 -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=LT+91aUPgidrpfbFh6TBtDGlGsW9aLVDV7w6NISVrpI=; b=SF4vF2vBslIkoKCywy7aMzhsPSkLybVFcUEsRwwx1+C5kIY/oXHTgcdoeBxY2A4r/y U9ojovFEFYU4DW5Cd20o7h+iy/o7LeFtFl0UjjtRMzofZUsJ2YtjQ76mrUZ6z8KWGahq IXBv0zT1a1iMtlYaHDlYVT/IMhhnSFU99g4YFrNP22e/lWvfQYrrV5lSFf1DjxuBNM9W Ixl/41ZHMybaRpAzoGei21aJBiV0qP8atWY2COC/d2xjE7jP4N7Y4MUNfKV3vHcyZurz 0cDOaOtJR079WnFvXvsmkytisskgD6S3E0ZY/D7wJUxfgjjR9atzXpwO3xi8yxPPMzuw XrPA== 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=LT+91aUPgidrpfbFh6TBtDGlGsW9aLVDV7w6NISVrpI=; b=eJgpMc+0jjnI2u/50S6wQFO7D6R83QiDTbq5FSCOKRkOcb2jidLCR40xAdYB3xwi4a eoHB/NqIxfUamgwSh7f+HAe9hvE8Jc6a5HOKXAuq/WaDnMhIovQOeRSSLYUXvCW9w37a bHw03ASMDLfEG5LzU/pyWvcOM2EThdMg4SwO30PRhm9NWYvUk3uymYcWIllrH40nNZlo +npOHcFKYGLXIeXKuBcqA5M2LrZKJPWPeWj/lkMMcAoRGcnEV2ZRlXzHKWZYtI9+iHu1 OCi3uCR79qqq5x9InXmOwjlpwgvQwLc+a98jBbeDqjuJwpK07UQBXiFiyw89/1ClsIpH 791g== X-Gm-Message-State: AOAM531Q21cxHTXVH9EVZhq7dy7mn8+VovPGSditpi4bV2UkW3pEXtji aFiaoQiZ+YjrnlgtAJ8mf1nhlIbBzhQ= X-Google-Smtp-Source: ABdhPJzZH0BgsQrGNxXvzSxnpKR9lJouu38/ZKq3/2Wu33pOoJJL9d4oSKZhnVA0YNU4yHtgYZSWVw== X-Received: by 2002:ad4:5baf:: with SMTP id 15mr2281912qvq.21.1642039776446; Wed, 12 Jan 2022 18:09:36 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id u6sm1068031qko.83.2022.01.12.18.09.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:09:36 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:09:08 -0300 Message-Id: <20220113020913.870-7-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 276/281] avdevice/lavfi: remove call to deprecated function av_buffersink_get_channel_layout() 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 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index fdb93b835f..db5d0b94de 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -333,11 +333,9 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) par->sample_aspect_ratio = av_buffersink_get_sample_aspect_ratio(sink); } else if (par->codec_type == AVMEDIA_TYPE_AUDIO) { par->sample_rate = av_buffersink_get_sample_rate(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; - } + ret = av_buffersink_get_ch_layout(sink, &par->ch_layout); + if (ret < 0) + goto end; 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) @@ -441,7 +439,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt) frame->format, frame->width, frame->height, 1); } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { size = frame->nb_samples * av_get_bytes_per_sample(frame->format) * - frame->channels; + frame->ch_layout.nb_channels; if ((ret = av_new_packet(pkt, size)) < 0) goto fail; memcpy(pkt->data, frame->data[0], size); -- 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".