summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-09-20 00:16:59 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-02 10:42:09 +0200
commit0b4fe2155e6ebe5d82c4a9cc58cb3a548c81ef4e (patch)
treee45ce72ec9df8f56f22b69aff40b1902d1265a19
parent95530c659c5591b7d4f3c223e9a31201f129497b (diff)
downloadffmpeg-0b4fe2155e6ebe5d82c4a9cc58cb3a548c81ef4e.tar.gz
avcodec/tdsc: Fix undefined shifts
Fixes the tdsc FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 86bef10e7aee338a4df60c57904c16e33509e76e) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavcodec/tdsc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/tdsc.c b/libavcodec/tdsc.c
index 4182404cf0..e9ea41ef55 100644
--- a/libavcodec/tdsc.c
+++ b/libavcodec/tdsc.c
@@ -187,7 +187,7 @@ static void tdsc_paint_cursor(AVCodecContext *avctx, uint8_t *dst, int stride)
static int tdsc_load_cursor(AVCodecContext *avctx)
{
TDSCContext *ctx = avctx->priv_data;
- int i, j, k, ret, bits, cursor_fmt;
+ int i, j, k, ret, cursor_fmt;
uint8_t *dst;
ctx->cursor_hot_x = bytestream2_get_le16(&ctx->gbc);
@@ -231,7 +231,7 @@ static int tdsc_load_cursor(AVCodecContext *avctx)
case CUR_FMT_MONO:
for (j = 0; j < ctx->cursor_h; j++) {
for (i = 0; i < ctx->cursor_w; i += 32) {
- bits = bytestream2_get_be32(&ctx->gbc);
+ uint32_t bits = bytestream2_get_be32(&ctx->gbc);
for (k = 0; k < 32; k++) {
dst[0] = !!(bits & 0x80000000);
dst += 4;
@@ -244,7 +244,7 @@ static int tdsc_load_cursor(AVCodecContext *avctx)
dst = ctx->cursor;
for (j = 0; j < ctx->cursor_h; j++) {
for (i = 0; i < ctx->cursor_w; i += 32) {
- bits = bytestream2_get_be32(&ctx->gbc);
+ uint32_t bits = bytestream2_get_be32(&ctx->gbc);
for (k = 0; k < 32; k++) {
int mask_bit = !!(bits & 0x80000000);
switch (dst[0] * 2 + mask_bit) {