From patchwork Mon Sep 10 19:07:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Matthews X-Patchwork-Id: 10290 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp2826082jap; Mon, 10 Sep 2018 12:15:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZTz93ViFqWDsosXs5d+/r0ay5apq4hx+wyM20DvmJcZJbj8kKWpN2aJ6k9kZNDC9y2q4A0 X-Received: by 2002:adf:f30b:: with SMTP id i11-v6mr16304956wro.161.1536606925508; Mon, 10 Sep 2018 12:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536606925; cv=none; d=google.com; s=arc-20160816; b=0qiv373g70EtC+6W9XtXW19cVb59PSnQ34sUOqRQhE6gfCC2d3JQBrOkTK6BQN3Gtp vX9x8jByg/xmOACqIIH6YAtY8X6USvW1Ya5ueE8DzyEEaUC1np07+gykCr/UTp2sBzsE FlJaEZLqp4HNg2J8W4FlRVmU7wA3EqKzvHrYTIYVN46B0ydTP3hela52juxD44BSxwGA QCOJvnYZ2r6Ymv1quOucM7Ru+77JsyDeTKzvlGkeYxDCp7egM3MQHLmxCjaxXvoXBJXx mzOtIY1B4Z2//tlD6rMhqgUYhdS8R0l5v09HsTJWA8DZKjQ2meRMtLtvf15N7nxpfRZ7 QZoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=1B37QrrgiwxI5T3R/Fm+JEw42dUV92xAvf62B4E03a0=; b=RhiwsIRp7Vi3jFwu+BmoMuKcw7quP5Mi7TQcKNtIHTXLSq37aiKVQsod+Q8yMhjtk8 ryvQqD81Ti31qsG/ZWK0FGcjfkLMzkXwh7glvfALJ/o2iQYWxCsob8FbClosTMX6ZNSJ JV4lOdBWt/PEJpTLtNafuCW0NJN9ckJYhn68KJjJtCUlt7kQLl1gV7/zojOUqYdd4nZo NcFk6mQTyfgmD4A1q8L5HykQXIdxYmYiC4kzy85erhGbHvKq8eTV2YRY6glJy9Q5DTFI ps+26fTNAYIAmOZpKIJy4i5KUBH+rHuRcRP1KpG9i/sllv3N1LYTCydZI5eQTGoaGttd k+iA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z15-v6si5519289wrh.223.2018.09.10.12.15.25; Mon, 10 Sep 2018 12:15:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 91328689AE7; Mon, 10 Sep 2018 22:15:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EFD13689AE7 for ; Mon, 10 Sep 2018 22:15:07 +0300 (EEST) Received: by mail-qt0-f195.google.com with SMTP id x7-v6so25513992qtk.5 for ; Mon, 10 Sep 2018 12:15:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QkeTvwz3g5MJ6Telr28oCFqE9tIPYsdelrIt0xZ7JYY=; b=QqtCLN5XOe4TOMCDCv3utGTp2o5uVRo/2dYWKNhJTlvl2HV0dAnoNrqH0t2QM5ZjpE 59bmYM6oK/LtEs6RuQ4Z+sriY6TJ77pXRNQZV4cMSd36m2m2NtaVQNDUAU3tjYhJR5+x sO+/lTrsLSc9F2rBLEHSO5mIrjxrN3gEncDbo1l2eWqsb6YX1SJyhS0xtjrf8V+krc8Y DuKdsyq/JRWohVa9dpqp5No5D89DuKsldJzWOmOdLssyRQ6fFHcG9WLO/eAZjyzBZEi4 fMfL7r35D7iDiP1GhytUyKvef8z3a6BWKd6QntK034g/ik7LLXpdEnnfHuMqe3XawJMX hePw== X-Gm-Message-State: APzg51B7QcclA/gxZ9Zyv93yjTiOQamJXelecE1BZDOiAbXKvePIFKQZ QxeW+RbaPwU83pUu0JDBuSOUBaQGeuI= X-Received: by 2002:a0c:9a49:: with SMTP id q9-v6mr15664573qvd.162.1536606443522; Mon, 10 Sep 2018 12:07:23 -0700 (PDT) Received: from bellini.lan (192-222-144-238.qc.cable.ebox.net. [192.222.144.238]) by smtp.gmail.com with ESMTPSA id t10-v6sm11155756qkl.79.2018.09.10.12.07.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 12:07:22 -0700 (PDT) From: Tristan Matthews To: ffmpeg-devel@ffmpeg.org Date: Mon, 10 Sep 2018 15:07:15 -0400 Message-Id: <20180910190715.11330-1-tmatth@videolan.org> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH] lavfi/silencedetect: fix spelling X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Tristan Matthews MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavfilter/af_silencedetect.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c index 6e321a5d97..d9582aa589 100644 --- a/libavfilter/af_silencedetect.c +++ b/libavfilter/af_silencedetect.c @@ -38,7 +38,7 @@ typedef struct SilenceDetectContext { double duration; ///< minimum duration of silence until notification int mono; ///< mono mode : check each channel separately (default = check when ALL channels are silent) int channels; ///< number of channels - int independant_channels; ///< number of entries in following arrays (always 1 in mono mode) + int independent_channels; ///< number of entries in following arrays (always 1 in mono mode) int64_t *nb_null_samples; ///< (array) current number of continuous zero samples int64_t *start; ///< (array) if silence is detected, this value contains the time of the first zero sample (default/unset = INT64_MIN) int64_t frame_end; ///< pts of the end of the current frame (used to compute duration of silence at EOS) @@ -77,12 +77,12 @@ static av_always_inline void update(SilenceDetectContext *s, AVFrame *insamples, int is_silence, int current_sample, int64_t nb_samples_notify, AVRational time_base) { - int channel = current_sample % s->independant_channels; + int channel = current_sample % s->independent_channels; if (is_silence) { if (s->start[channel] == INT64_MIN) { s->nb_null_samples[channel]++; if (s->nb_null_samples[channel] >= nb_samples_notify) { - s->start[channel] = insamples->pts + av_rescale_q(current_sample / s->channels + 1 - nb_samples_notify * s->independant_channels / s->channels, + s->start[channel] = insamples->pts + av_rescale_q(current_sample / s->channels + 1 - nb_samples_notify * s->independent_channels / s->channels, (AVRational){ 1, s->last_sample_rate }, time_base); set_meta(insamples, s->mono ? channel + 1 : 0, "silence_start", av_ts2timestr(s->start[channel], &time_base)); @@ -141,14 +141,14 @@ static int config_input(AVFilterLink *inlink) int c; s->channels = inlink->channels; - s->independant_channels = s->mono ? s->channels : 1; - s->nb_null_samples = av_mallocz_array(sizeof(*s->nb_null_samples), s->independant_channels); + s->independent_channels = s->mono ? s->channels : 1; + s->nb_null_samples = av_mallocz_array(sizeof(*s->nb_null_samples), s->independent_channels); if (!s->nb_null_samples) return AVERROR(ENOMEM); - s->start = av_malloc_array(sizeof(*s->start), s->independant_channels); + s->start = av_malloc_array(sizeof(*s->start), s->independent_channels); if (!s->start) return AVERROR(ENOMEM); - for (c = 0; c < s->independant_channels; c++) + for (c = 0; c < s->independent_channels; c++) s->start[c] = INT64_MIN; switch (inlink->format) { @@ -178,7 +178,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) // scale number of null samples to the new sample rate if (s->last_sample_rate && s->last_sample_rate != srate) - for (c = 0; c < s->independant_channels; c++) { + for (c = 0; c < s->independent_channels; c++) { s->nb_null_samples[c] = srate * s->nb_null_samples[c] / s->last_sample_rate; } s->last_sample_rate = srate; @@ -231,7 +231,7 @@ static av_cold void uninit(AVFilterContext *ctx) SilenceDetectContext *s = ctx->priv; int c; - for (c = 0; c < s->independant_channels; c++) + for (c = 0; c < s->independent_channels; c++) if (s->start[c] > INT64_MIN) update(s, NULL, 0, c, 0, s->time_base); av_freep(&s->nb_null_samples);