diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c
index c3eec02e8fecfab6282dfc3af2d60228513d71a4..29ee2a3adce87a5b53ed48325dfe5ea3a7f99cca 100644
--- a/libavformat/lmlm4.c
+++ b/libavformat/lmlm4.c
@@ -35,7 +35,7 @@
 #define LMLM4_MAX_PACKET_SIZE   1024 * 1024
 
 static int lmlm4_probe(AVProbeData * pd) {
-    unsigned char *buf = pd->buf;
+    const unsigned char *buf = pd->buf;
     unsigned int frame_type, packet_size;
 
     frame_type  = AV_RB16(buf+2);