diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-06 23:34:56 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-07 20:58:00 +0200 |
commit | 2f9a33995a7be728d7ab4dce913be5a871c5cc5f (patch) | |
tree | 56ad9dce622bddd7b8a0e897bcc442411399a796 | |
parent | 74375305efd9636556a82823bff0a9300f5b7cec (diff) | |
download | ffmpeg-2f9a33995a7be728d7ab4dce913be5a871c5cc5f.tar.gz |
avcodec/v210dec: Don't cast const away
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/v210dec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 814d65bbda..04bcc612b7 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -33,7 +33,7 @@ typedef struct ThreadData { AVFrame *frame; - uint8_t *buf; + const uint8_t *buf; int stride; } ThreadData; @@ -111,7 +111,7 @@ static int v210_decode_slice(AVCodecContext *avctx, void *arg, int jobnr, int th int stride = td->stride; int slice_start = (avctx->height * jobnr) / s->thread_count; int slice_end = (avctx->height * (jobnr+1)) / s->thread_count; - uint8_t *psrc = td->buf + stride * slice_start; + const uint8_t *psrc = td->buf + stride * slice_start; int16_t *py = (uint16_t*)frame->data[0] + slice_start * frame->linesize[0] / 2; int16_t *pu = (uint16_t*)frame->data[1] + slice_start * frame->linesize[1] / 2; int16_t *pv = (uint16_t*)frame->data[2] + slice_start * frame->linesize[2] / 2; @@ -191,7 +191,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if (stride) { td.stride = stride; - td.buf = (uint8_t*)psrc; + td.buf = psrc; td.frame = pic; avctx->execute2(avctx, v210_decode_slice, &td, NULL, s->thread_count); } else { |