diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c
index 2670c8d975e6648363d4f362b6d1c3d475788e28..62912a81ae7bf8502596027f79bacae35cb32d2a 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -58,7 +58,7 @@ static int aasc_decode_init(AVCodecContext *avctx)
 
 static int aasc_decode_frame(AVCodecContext *avctx,
                               void *data, int *data_size,
-                              uint8_t *buf, int buf_size)
+                              const uint8_t *buf, int buf_size)
 {
     AascContext *s = avctx->priv_data;
     int stream_ptr = 4;
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 762c23f5b67c52067617e1d9a1353e926f7e2a51..0689a46ef5c07d173af06d7ba4cd468750f329a4 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -107,7 +107,7 @@ static void allocate_buffers(ALACContext *alac)
 
 static int alac_set_info(ALACContext *alac)
 {
-    unsigned char *ptr = alac->avctx->extradata;
+    const unsigned char *ptr = alac->avctx->extradata;
 
     ptr += 4; /* size */
     ptr += 4; /* alac */
@@ -439,7 +439,7 @@ static void reconstruct_stereo_16(int32_t *buffer[MAX_CHANNELS],
 
 static int alac_decode_frame(AVCodecContext *avctx,
                              void *outbuffer, int *outputsize,
-                             uint8_t *inbuffer, int input_buffer_size)
+                             const uint8_t *inbuffer, int input_buffer_size)
 {
     ALACContext *alac = avctx->priv_data;
 
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
index 104ed31b7b5e4745772ad114611fe48ebd297784..e5dd5ea05476124a2950f26cbce31eb4bb932699 100644
--- a/libavcodec/sp5xdec.c
+++ b/libavcodec/sp5xdec.c
@@ -32,13 +32,14 @@
 
 static int sp5x_decode_frame(AVCodecContext *avctx,
                               void *data, int *data_size,
-                              uint8_t *buf, int buf_size)
+                              const uint8_t *buf, int buf_size)
 {
 #if 0
     MJpegDecodeContext *s = avctx->priv_data;
 #endif
     const int qscale = 5;
-    uint8_t *buf_ptr, *buf_end, *recoded;
+    const uint8_t *buf_ptr, *buf_end;
+    uint8_t *recoded;
     int i = 0, j = 0;
 
     if (!avctx->width || !avctx->height)