Commit ecafde66 authored by Clément Bœsch's avatar Clément Bœsch

avfilter/showwaves: fix height range for cline mode

parent f6950a07
......@@ -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)
{
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 end = start + h;
for (k = start; k < end; k++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment