Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-10 19:00:56 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-12 09:33:11 +0300
commite92e74b89766146869f2ffe44b85b63fd39a3b66 (patch)
tree66639f5b13de32c3f0c0c982f2eaa455a6a78d20 /libavcodec/texturedspenc.c
parentcf9e470d05e69dd7e534dda59ad91dd8a0337670 (diff)
avcodec/texturedspenc: Fix invalid shift
Left shifts of signed types are UB unless the results fit into the type. (Furthermore the value to be shifted need to be nonnegative.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/texturedspenc.c')
-rw-r--r--libavcodec/texturedspenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/texturedspenc.c b/libavcodec/texturedspenc.c
index 381be16f75..21e341c613 100644
--- a/libavcodec/texturedspenc.c
+++ b/libavcodec/texturedspenc.c
@@ -181,9 +181,9 @@ static unsigned int match_colors(const uint8_t *block, ptrdiff_t stride,
int x, y, k = 0;
int c0_point, half_point, c3_point;
uint8_t color[16];
- static const int indexMap[8] = {
- 0 << 30, 2 << 30, 0 << 30, 2 << 30,
- 3 << 30, 3 << 30, 1 << 30, 1 << 30,
+ static const uint32_t indexMap[8] = {
+ 0U << 30, 2U << 30, 0U << 30, 2U << 30,
+ 3U << 30, 3U << 30, 1U << 30, 1U << 30,
};
/* Fill color and compute direction for each component */