History

avfilter/af_aiir: fix first delay value

Paul B Mahol committed 6 years ago

Commit 1fc5ddf1 parent 38490cb1 file · +2 −6Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_aiir.c+2−6
@@ -823,7 +823,7 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out, int sample_rate) · 822 unmodified lines
823823 {
824824 AudioIIRContext *s = ctx->priv;
825825 double *mag, *phase, *temp, *delay, min = DBL_MAX, max = -DBL_MAX;
826− double min_delay, max_delay, min_phase, max_phase;
826+ double min_delay = DBL_MAX, max_delay = -DBL_MAX, min_phase, max_phase;
827827 int prev_ymag = -1, prev_yphase = -1, prev_ydelay = -1;
828828 char text[32];
829829 int ch, i;
@@ -869,9 +869,6 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out, int sample_rate) · 39 unmodified lines
869869 max_phase = fmax(max_phase, phase[i]);
870870 }
871871
872− delay[0] = 0.;
873− min_delay = 0.;
874− max_delay = 0.;
875872 for (i = 0; i < s->w - 1; i++) {
876873 double div = s->w / (double)sample_rate;
877874
@@ -879,8 +876,7 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out, int sample_rate) · 1 unmodified line
879876 min_delay = fmin(min_delay, delay[i + 1]);
880877 max_delay = fmax(max_delay, delay[i + 1]);
881878 }
882−
883− delay[i] = delay[i - 1];
879+ delay[0] = delay[1];
884880
885881 for (i = 0; i < s->w; i++) {
886882 int ymag = mag[i] / max * (s->h - 1);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t