diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-04 12:03:01 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-04 15:04:01 +0200 |
commit | 930e560da3c608955818c757edad26ebd71f4305 (patch) | |
tree | 90d8a242fd13e662cc721169a4b6a8d3316959a4 /libavcodec/fic.c | |
parent | 88f9b1fc4546e430a7fcaf6f5f629c1e4b7fe7e0 (diff) | |
download | ffmpeg-930e560da3c608955818c757edad26ebd71f4305.tar.gz |
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/fic.c')
-rw-r--r-- | libavcodec/fic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/fic.c b/libavcodec/fic.c index e56a1a323c..491f63ea0c 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -32,7 +32,7 @@ typedef struct FICThreadContext { DECLARE_ALIGNED(16, int16_t, block)[64]; - uint8_t *src; + const uint8_t *src; int slice_h; int src_size; int y_off; @@ -174,7 +174,7 @@ static int fic_decode_slice(AVCodecContext *avctx, void *tdata) FICContext *ctx = avctx->priv_data; FICThreadContext *tctx = tdata; GetBitContext gb; - uint8_t *src = tctx->src; + const uint8_t *src = tctx->src; int slice_h = tctx->slice_h; int src_size = tctx->src_size; int y_off = tctx->y_off; @@ -271,14 +271,14 @@ static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt) { FICContext *ctx = avctx->priv_data; - uint8_t *src = avpkt->data; + const uint8_t *src = avpkt->data; int ret; int slice, nslices; int msize; int tsize; int cur_x, cur_y; int skip_cursor = ctx->skip_cursor; - uint8_t *sdata; + const uint8_t *sdata; if ((ret = ff_reget_buffer(avctx, ctx->frame, 0)) < 0) return ret; |