diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index d6921ea4eb684cbe8099a0c4be286adc54a1aeca..b27e755a86e027b52b69fa6104f5fdb3be153d9f 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -457,7 +457,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
     AVFrame *const p = &l->picture;
     uint8_t frametype = 0;
     uint32_t offset_gu = 0, offset_bv = 0, offset_ry = 9;
-    int offs[4];
+    uint32_t offs[4];
     uint8_t *srcs[4], *dst;
     int i, j, planes = 3;