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 35C2A464E1 for ; Wed, 19 Jul 2023 23:36:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 62B5568C577; Thu, 20 Jul 2023 02:36:10 +0300 (EEST) Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 239BC68C1EE for ; Thu, 20 Jul 2023 02:36:04 +0300 (EEST) Received: by mail-vs1-f47.google.com with SMTP id ada2fe7eead31-440db8e60c8so114947137.0 for ; Wed, 19 Jul 2023 16:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689809762; x=1690414562; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=2fu5pWXby8W/mFoXI5rMEvfw8cCB1Qi1fVSbL+3OQlA=; b=FgJXGVis+vvxK+72vaBbI4H+T1GSy1ktjngQZcm3cyMVd9M2Wd9KERxn+STnZ+cd74 WQyZm0RMV34M4aWBcvpG4N8z+iQ2Zve/F5jI5AapGZMHEvzIwZ3tUWaF/iIvTQuFGhRa LWh88bZozw7CqYc4APkPgq/FzW6Lwe4woMaBsmCCyHT0EDTbmRbs1wUJdYMsROr2jksy AdpRAEVw5tdbX3xyLZykWssVxfkvYpmuOwYIMrSI1P1pgJmlHagEBdVXDAv46hgrvdYq Sr+zaf6WCImlP/NaLy57vwE6CJasrsDVPFSeMApMv1AnLEzFoNLDvMrAiQ7JEQJXpf1z 5deQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689809762; x=1690414562; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2fu5pWXby8W/mFoXI5rMEvfw8cCB1Qi1fVSbL+3OQlA=; b=VknYckzH3RTfZhMDErU9WwRsFmpfFPZ2W9L8AsjAjmoI1i6logj/SS1hEuD8G7itdV /9IeR6oBTcHmuz3BCe33UZm4nyCiE1jgpEiN48fLZc5E19es+5Ksyguc5AtKf7EDGyiJ 0A3zMPCk5CyRDM7wWSOUMwEznVMOiyeZNnIRgsk7wu/qqSN3eGZyP+X6/6DWGBmRQ2Pz 8iCwE1YZQV1GMfVAuI1pubE9UKDKrAJdtT1xIFSt7mwC9W8RIdD7M5vJSzpDGSA6b3JK wPRykjuhoR4pl48Ja9XaUaXNrVvNcDhn2mdOyZQxKrKJPV9nZiUOYzE0O7liaA8EA1iO AzaA== X-Gm-Message-State: ABy/qLZ3WTJ0A+sTr/CTNuvqtnSWdzYWbaf06md2X53y+baBSxJDgrIN gBWUcmv6enmImTmFde9/17RkIu+dQUI= X-Google-Smtp-Source: APBJJlFiTVI7ks2GGOTwSJ/zcObWSsyiGlpS4TTRKQl4hgvRaqTTFHneKzWvl+84qrvX+RIZvcTh6w== X-Received: by 2002:a67:db18:0:b0:443:9248:3410 with SMTP id z24-20020a67db18000000b0044392483410mr594939vsj.32.1689809761911; Wed, 19 Jul 2023 16:36:01 -0700 (PDT) Received: from [192.168.1.15] ([35.142.174.80]) by smtp.gmail.com with ESMTPSA id x25-20020ab05799000000b006904fa86e7csm865978uaa.2.2023.07.19.16.36.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jul 2023 16:36:01 -0700 (PDT) Message-ID: <92042a43-692a-b3b6-236c-dad1c44124d7@gmail.com> Date: Wed, 19 Jul 2023 19:36:00 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: FFmpeg development discussions and patches References: <20230716051246.7793-1-qyot27@gmail.com> <20230716051246.7793-2-qyot27@gmail.com> Content-Language: en-US From: Stephen Hutchinson In-Reply-To: <20230716051246.7793-2-qyot27@gmail.com> Subject: Re: [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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 7/16/23 1:12 AM, Stephen Hutchinson wrote: > --- > 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; Pushed. _______________________________________________ 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".