History

avfilter/avf_showwaves: make use of av_rescale_q

Paul B Mahol committed 7 years ago

Commit 62c87071 parent cd753961 file · +1 −1Browse files

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

Unified · Split

libavfilter/avf_showwaves.c+1−1
@@ -416,7 +416,7 @@ static int config_output(AVFilterLink *outlink) · 415 unmodified lines
416416 showwaves->n = 1;
417417
418418 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));
420420
421421 showwaves->buf_idx = 0;
422422 if (!(showwaves->buf_idy = av_mallocz_array(nb_channels, sizeof(*showwaves->buf_idy)))) {

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