summaryrefslogtreecommitdiff
path: root/libavcodec/msrle.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-04 12:03:01 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-04 15:04:01 +0200
commit930e560da3c608955818c757edad26ebd71f4305 (patch)
tree90d8a242fd13e662cc721169a4b6a8d3316959a4 /libavcodec/msrle.c
parent88f9b1fc4546e430a7fcaf6f5f629c1e4b7fe7e0 (diff)
avcodec/decoders: Use const uint8_t* to access input packet data
These packets need not be writable, so we must not modify them. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/msrle.c')
-rw-r--r--libavcodec/msrle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index 041d0c9493..f9d7141c03 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -108,7 +108,7 @@ static int msrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
if (avctx->height * istride == avpkt->size) { /* assume uncompressed */
int linesize = av_image_get_linesize(avctx->pix_fmt, avctx->width, 0);
uint8_t *ptr = s->frame->data[0];
- uint8_t *buf = avpkt->data + (avctx->height-1)*istride;
+ const uint8_t *buf = avpkt->data + (avctx->height-1)*istride;
int i, j;
if (linesize < 0)