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 5CB4942E67 for ; Thu, 13 Jan 2022 02:38:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 97FBD68B7FB; Thu, 13 Jan 2022 04:05:38 +0200 (EET) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 00C2768B7F5 for ; Thu, 13 Jan 2022 04:05:32 +0200 (EET) Received: by mail-qt1-f172.google.com with SMTP id c7so1770970qtc.11 for ; Wed, 12 Jan 2022 18:05:32 -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=L/h0Ksobu1O4/mHqVnHqt3EWVXRuzjxlGvmHoylMRyM=; b=pCKJhxH1Xpu6mcV2GVA5LISUf0C25flQ/Oy7n9HNQ3ulK/6WEsXxfyt4Tuh9/2leIT aaYvA44zVHjmi6LCo0ATJybySr7s+vOGk9mdZaQJ0fJ/tuyB6RWzKuvOPKPBBLhK0eK2 p0PjMq6fDH2ZOS3cmbSSP+WDd23ucsn2vmxf1kNx1R0gdOJ/eMZVzwh/mSknqY1qz1kG +iSyNQ+jPHRpr12cLrmb3y9chXc9GG0J+VEM2zFMu0KKVeII0VXGp+1gk3RZoJ962ltL Od8wgThbYZthJ0tLbAkXD40pDoWX0oL1Rgyz8tty52GtXLdEaQiO7Rdx1g4YyL5rd5AX 3z1w== 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=L/h0Ksobu1O4/mHqVnHqt3EWVXRuzjxlGvmHoylMRyM=; b=BCoYrN3ijHsoEmrq+/wWNhv5kzvozvHUd/WHAJUdp16Lg/AIeRUzwK+/HkbOUd67xH 5Imnrr9ZiMWss2sONEYCSK0QgGnNO9+ZkzQZLPDG6oUpMvuNVwzpehgYx/FzFySqoM00 8FFNOwJU5dft0tpNV/C1BGi4NvWjQZT5DvQLlVsjmZBDwZjhp+f0m4W5d55His17uYSf RkrC7LKrnCNUqyEaHaDrDrqeKDb+d+oNo6C68njtATOiyRJ89Z3/QVsMLBhYVr2jlOL4 s/ZozXFIEfh1ajbXw+Z+MmRNmzREGYx2kVCkl9KlUL2KUOcibnIeVOfhQPBhKtMrKEBr W9/w== X-Gm-Message-State: AOAM532ceq1rm7WpskpJ8yCuOTT95QDztaE2KQ0/0H4qxvoXBJ2HWWMG lwQpU+fEc4qj1fSLWzX66XuifVwTykc= X-Google-Smtp-Source: ABdhPJwdo0CCT8N5cLLoPInTnO2dqD5jEqkVeWbpr6maB5e0l2vsa2Rx5Ia/c6Oy15SG7PlYKIPC7w== X-Received: by 2002:a05:622a:1109:: with SMTP id e9mr1975542qty.606.1642039531669; Wed, 12 Jan 2022 18:05:31 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id k9sm1264556qko.29.2022.01.12.18.05.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:05:31 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:04:49 -0300 Message-Id: <20220113020518.730-1-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 210/281] ffwavesynth: 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: From: Anton Khirnov Signed-off-by: James Almer --- libavcodec/ffwavesynth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c index a1211facb9..229a89663d 100644 --- a/libavcodec/ffwavesynth.c +++ b/libavcodec/ffwavesynth.c @@ -314,7 +314,7 @@ static av_cold int wavesynth_init(AVCodecContext *avc) struct wavesynth_context *ws = avc->priv_data; int i, r; - if (avc->channels > WS_MAX_CHANNELS) { + if (avc->ch_layout.nb_channels > WS_MAX_CHANNELS) { av_log(avc, AV_LOG_ERROR, "This implementation is limited to %d channels.\n", WS_MAX_CHANNELS); @@ -438,11 +438,11 @@ static int wavesynth_decode(AVCodecContext *avc, void *rframe, int *rgot_frame, return r; pcm = (int16_t *)frame->data[0]; for (s = 0; s < duration; s++, ts+=(uint64_t)1) { - memset(channels, 0, avc->channels * sizeof(*channels)); + memset(channels, 0, avc->ch_layout.nb_channels * sizeof(*channels)); if (ts >= ws->next_ts) wavesynth_enter_intervals(ws, ts); wavesynth_synth_sample(ws, ts, channels); - for (c = 0; c < avc->channels; c++) + for (c = 0; c < avc->ch_layout.nb_channels; c++) *(pcm++) = channels[c] >> 16; } ws->cur_ts += (uint64_t)duration; -- 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".