diff --git a/libavformat/loasdec.c b/libavformat/loasdec.c
index ccb9464c33867c0d566ffa0586d95c8b306c48ac..2a06fe12a79e91c55a00bf68fa6267517b7b9c79 100644
--- a/libavformat/loasdec.c
+++ b/libavformat/loasdec.c
@@ -29,10 +29,10 @@ static int loas_probe(AVProbeData *p)
 {
     int max_frames = 0, first_frames = 0;
     int fsize, frames;
-    uint8_t *buf0 = p->buf;
-    uint8_t *buf2;
-    uint8_t *buf;
-    uint8_t *end = buf0 + p->buf_size - 3;
+    const uint8_t *buf0 = p->buf;
+    const uint8_t *buf2;
+    const uint8_t *buf;
+    const uint8_t *end = buf0 + p->buf_size - 3;
     buf = buf0;
 
     for(; buf < end; buf= buf2+1) {