mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avfilter/vf_palettegen: fix integer overflow
This commit is contained in:
parent
4cdab8d022
commit
124eec942a
@ -113,8 +113,8 @@ static int cmp_##name(const void *pa, const void *pb) \
|
|||||||
{ \
|
{ \
|
||||||
const struct color_ref * const *a = pa; \
|
const struct color_ref * const *a = pa; \
|
||||||
const struct color_ref * const *b = pb; \
|
const struct color_ref * const *b = pb; \
|
||||||
return ((*a)->color >> (8 * (2 - (pos))) & 0xff) \
|
return (int)((*a)->color >> (8 * (2 - (pos))) & 0xff) \
|
||||||
- ((*b)->color >> (8 * (2 - (pos))) & 0xff); \
|
- (int)((*b)->color >> (8 * (2 - (pos))) & 0xff); \
|
||||||
}
|
}
|
||||||
|
|
||||||
DECLARE_CMP_FUNC(r, 0)
|
DECLARE_CMP_FUNC(r, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user