diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-26 09:09:44 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-05 03:21:41 +0200 |
commit | 5828e8209f48f206c42b69e314a6988b50e98924 (patch) | |
tree | b1ce7a4fdbafb8e2ec3706340736812dae042016 /libavcodec/r210enc.c | |
parent | cee40a945abc3568e270899eefb8bf6cf7e5ab3c (diff) | |
download | ffmpeg-5828e8209f48f206c42b69e314a6988b50e98924.tar.gz |
avcodec: Constify frame->data pointers for encoders where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/r210enc.c')
-rw-r--r-- | libavcodec/r210enc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c index dca6fa7197..139e5b75eb 100644 --- a/libavcodec/r210enc.c +++ b/libavcodec/r210enc.c @@ -47,7 +47,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int aligned_width = FFALIGN(avctx->width, avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64); int pad = (aligned_width - avctx->width) * 4; - uint8_t *srcr_line, *srcg_line, *srcb_line; + const uint8_t *srcr_line, *srcg_line, *srcb_line; uint8_t *dst; ret = ff_get_encode_buffer(avctx, pkt, 4 * aligned_width * avctx->height, 0); @@ -60,9 +60,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, dst = pkt->data; for (i = 0; i < avctx->height; i++) { - uint16_t *srcr = (uint16_t *)srcr_line; - uint16_t *srcg = (uint16_t *)srcg_line; - uint16_t *srcb = (uint16_t *)srcb_line; + const uint16_t *srcr = (const uint16_t *)srcr_line; + const uint16_t *srcg = (const uint16_t *)srcg_line; + const uint16_t *srcb = (const uint16_t *)srcb_line; for (j = 0; j < avctx->width; j++) { uint32_t pixel; unsigned r = *srcr++; |