Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -416,7 +416,7 @@ static int config_output(AVFilterLink *outlink) · 415 unmodified lines | ||
| 416 | 416 | showwaves->n = 1; |
| 417 | 417 | |
| 418 | 418 | if (!showwaves->n) |
| 419 | − showwaves->n = FFMAX(1, ((double)inlink->sample_rate / (showwaves->w * av_q2d(showwaves->rate))) + 0.5); | |
| 419 | + showwaves->n = FFMAX(1, av_rescale_q(inlink->sample_rate, av_make_q(1, showwaves->w), showwaves->rate)); | |
| 420 | 420 | |
| 421 | 421 | showwaves->buf_idx = 0; |
| 422 | 422 | if (!(showwaves->buf_idy = av_mallocz_array(nb_channels, sizeof(*showwaves->buf_idy)))) { |