avfilter/showwaves: fix height range for cline mode

This commit is contained in:
Clément Bœsch 2014-12-24 15:11:44 +01:00
parent f6950a077c
commit ecafde6606
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ static void draw_sample_cline(uint8_t *buf, int height, int linesize,
int16_t sample, int16_t *prev_y, int intensity) int16_t sample, int16_t *prev_y, int intensity)
{ {
int k; int k;
const int h = av_rescale(abs(sample), height, UINT16_MAX); const int h = av_rescale(abs(sample), height, INT16_MAX);
const int start = (height - h) / 2; const int start = (height - h) / 2;
const int end = start + h; const int end = start + h;
for (k = start; k < end; k++) for (k = start; k < end; k++)