Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -127,11 +127,11 @@ static int config_input(AVFilterLink *inlink) · 126 unmodified lines | |||
| 127 | int c; | 127 | int c; |
| 128 | AVFilterContext *ctx = inlink->dst; | 128 | AVFilterContext *ctx = inlink->dst; |
| 129 | VibratoContext *s = ctx->priv; | 129 | VibratoContext *s = ctx->priv; |
| 130 | s->channels = inlink->channels; | ||
| 131 | 130 | ||
| 132 | s->buf = av_calloc(inlink->channels, sizeof(*s->buf)); | 131 | s->buf = av_calloc(inlink->channels, sizeof(*s->buf)); |
| 133 | if (!s->buf) | 132 | if (!s->buf) |
| 134 | return AVERROR(ENOMEM); | 133 | return AVERROR(ENOMEM); |
| 134 | s->channels = inlink->channels; | ||
| 135 | s->buf_size = lrint(inlink->sample_rate * 0.005 + 0.5); | 135 | s->buf_size = lrint(inlink->sample_rate * 0.005 + 0.5); |
| 136 | for (c = 0; c < s->channels; c++) { | 136 | for (c = 0; c < s->channels; c++) { |
| 137 | s->buf[c] = av_malloc_array(s->buf_size, sizeof(*s->buf[c])); | 137 | s->buf[c] = av_malloc_array(s->buf_size, sizeof(*s->buf[c])); |