diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-07 16:01:04 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-08 14:00:37 +0100 |
commit | 9ae40f282d5e68025be553c60cb91d4672ebe5bb (patch) | |
tree | f577d903386b80f7db9b201636960dcae11bf9e8 /libavcodec/nvdec_av1.c | |
parent | cd31eac9997dc49b1d2b8de97b38c51ed8e9f4c9 (diff) | |
download | ffmpeg-9ae40f282d5e68025be553c60cb91d4672ebe5bb.tar.gz |
avcodec/nvdec: Constify bitstream pointee
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/nvdec_av1.c')
-rw-r--r-- | libavcodec/nvdec_av1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/nvdec_av1.c b/libavcodec/nvdec_av1.c index 74b0442177..35f22ebf80 100644 --- a/libavcodec/nvdec_av1.c +++ b/libavcodec/nvdec_av1.c @@ -303,7 +303,7 @@ static int nvdec_av1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, /* Shortcut if all tiles are in the same buffer */ if (ctx->nb_slices == s->tg_end - s->tg_start + 1) { - ctx->bitstream = (uint8_t*)buffer; + ctx->bitstream = buffer; ctx->bitstream_len = size; for (int i = 0; i < ctx->nb_slices; ++i) { @@ -321,7 +321,7 @@ static int nvdec_av1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, } ctx->bitstream = ctx->bitstream_internal = tmp; - memcpy(ctx->bitstream + ctx->bitstream_len, buffer, size); + memcpy(ctx->bitstream_internal + ctx->bitstream_len, buffer, size); for (uint32_t tile_num = s->tg_start; tile_num <= s->tg_end; ++tile_num) { ctx->slice_offsets[tile_num*2 ] = ctx->bitstream_len + s->tile_group_info[tile_num].tile_offset; |