From 9ae40f282d5e68025be553c60cb91d4672ebe5bb Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 7 Feb 2024 16:01:04 +0100 Subject: avcodec/nvdec: Constify bitstream pointee Reviewed-by: Timo Rothenpieler Signed-off-by: Andreas Rheinhardt --- libavcodec/nvdec_av1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/nvdec_av1.c') 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; -- cgit v1.2.3