avfilter/vf_thumbnail: fix buffer overflow for odd sized HBD inputs
This histogram index was not correctly downshifted to 8-bit.
This commit is contained in:
parent
09cb2d41d1
commit
ac59fc542f
1 changed files with 1 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ static void get_hist16(int *hist, const uint8_t *p, ptrdiff_t stride,
|
|||
}
|
||||
/* handle tail */
|
||||
for (int x = width4; x < width; x++)
|
||||
hist[p16[x]]++;
|
||||
hist[(uint8_t) (p16[x] >> shift)]++;
|
||||
p += stride;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue