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 C750446E99 for ; Sun, 16 Jul 2023 05:13:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 986B868C4C5; Sun, 16 Jul 2023 08:13:01 +0300 (EEST) Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1BA8468C39F for ; Sun, 16 Jul 2023 08:12:55 +0300 (EEST) Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-47e36c35285so1048741e0c.0 for ; Sat, 15 Jul 2023 22:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689484373; x=1692076373; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=padDW3fPA7gp20ByE+/UoiX/5wI2BBGPqfJ/dZ0+HuM=; b=EL9ritxY1gyT0/P3urWaE2kgXC/TrF08ccuKgfymIX/lxZf8EGBDTm3QvRl17A0mJ0 YrBWuZNBMRm6C6t57/J/GvGxwXXX9/3vqxuOlgUZg3kiUdEm53735TpXLlUWsIf9ggqm S+rQyDAO7m+z+iZbLxy7l1tu5zv4hdw54RDfvA7q2+CMCCPkFHr+xIjAeED35ccPkpT/ U+CaD6+Eza6wATWVkxJ181KjpVWvxaYthBF8Lz9UJqp6oYHrGnqnzyJuvkpfENzhG+ni bNo4ZY8RprOlawiztArwUVM+LYKtBrpsQ1NqB2FAgEPbzjuWGr9GiGeHZSrI8xWl7V/Z U9sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689484373; x=1692076373; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=padDW3fPA7gp20ByE+/UoiX/5wI2BBGPqfJ/dZ0+HuM=; b=FHfvzEBWznZ/EOhUK1JWB6/HNlQJZq2br6QGzz8RD5I5QQAOKcwgSCMaFtBdIteY1B 2j5P01GXxzpiW1lZL5XRhYS3Hc6rRNYYmqZpNonzsVZGCy23irOu/jEi7MikquKd+FFG e5T7O4MK8Gu2BFItPSvdJiOOF6cK7309SfIsIu3IvDPZpvK5udpEK15oem57DQOf2CuF +Jh4QGL7kRiiIK4OqBY505AaaVq3dLUAfq44SpdZDmcXc+BXR80eiHnrTCshtnmj46xT udynYRPANaNDWRbaaUBySUh+rLBhIaMSU9G2mdVe0IgIfyKJs94jGji4mbLcCI0SB3GL JIpg== X-Gm-Message-State: ABy/qLYDdajys7EPi2Z40MoWl3sL3l1A6zs3j97CHZcSjCm4G4dyjztI qFkGYhWtA8f46nRNfHOlxr3f9zycdwY= X-Google-Smtp-Source: APBJJlHfpeBy8ZCl41wYQgKsV6Y+QQdFbXRRmZdMSeXV9kHWgM6sEaiJlE6DUQHivwqPZDYzw0T03Q== X-Received: by 2002:a1f:5fd1:0:b0:47b:802b:ff38 with SMTP id t200-20020a1f5fd1000000b0047b802bff38mr5026238vkb.7.1689484373365; Sat, 15 Jul 2023 22:12:53 -0700 (PDT) Received: from cappuccino.. ([35.142.174.80]) by smtp.gmail.com with ESMTPSA id i7-20020ac5cd87000000b00483e3d330ccsm111562vka.22.2023.07.15.22.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 22:12:52 -0700 (PDT) From: Stephen Hutchinson To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Jul 2023 01:12:45 -0400 Message-Id: <20230716051246.7793-2-qyot27@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230716051246.7793-1-qyot27@gmail.com> References: <20230716051246.7793-1-qyot27@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avisynth: pass audio 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 Cc: Stephen Hutchinson 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: --- libavformat/avisynth.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index b426ac343e..027e8c63f6 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -62,6 +62,7 @@ typedef struct AviSynthLibrary { AVSC_DECLARE_FUNC(avs_create_script_environment); AVSC_DECLARE_FUNC(avs_delete_script_environment); AVSC_DECLARE_FUNC(avs_get_audio); + AVSC_DECLARE_FUNC(avs_get_channel_mask); AVSC_DECLARE_FUNC(avs_get_error); AVSC_DECLARE_FUNC(avs_get_frame); AVSC_DECLARE_FUNC(avs_get_version); @@ -157,6 +158,7 @@ static av_cold int avisynth_load_library(void) LOAD_AVS_FUNC(avs_create_script_environment, 0); LOAD_AVS_FUNC(avs_delete_script_environment, 0); LOAD_AVS_FUNC(avs_get_audio, 0); + LOAD_AVS_FUNC(avs_get_channel_mask, 1); LOAD_AVS_FUNC(avs_get_error, 1); // New to AviSynth 2.6 LOAD_AVS_FUNC(avs_get_frame, 0); LOAD_AVS_FUNC(avs_get_version, 0); @@ -793,6 +795,10 @@ static int avisynth_create_stream_audio(AVFormatContext *s, AVStream *st) st->duration = avs->vi->num_audio_samples; avpriv_set_pts_info(st, 64, 1, avs->vi->audio_samples_per_second); + if (avs_library.avs_get_version(avs->clip) >= 10) + av_channel_layout_from_mask(&st->codecpar->ch_layout, + avs_library.avs_get_channel_mask(avs->vi)); + switch (avs->vi->sample_type) { case AVS_SAMPLE_INT8: st->codecpar->codec_id = AV_CODEC_ID_PCM_U8; -- 2.39.2 _______________________________________________ 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".