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/sgienc.c | |
parent | cee40a945abc3568e270899eefb8bf6cf7e5ab3c (diff) |
avcodec: Constify frame->data pointers for encoders where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/sgienc.c')
-rw-r--r-- | libavcodec/sgienc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c index 5d2cc7e3b9..7edc7cca83 100644 --- a/libavcodec/sgienc.c +++ b/libavcodec/sgienc.c @@ -96,7 +96,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, SgiContext *s = avctx->priv_data; const AVFrame * const p = frame; PutByteContext pbc; - uint8_t *in_buf, *encode_buf; + uint8_t *encode_buf; int x, y, z, length, tablesize, ret, i; unsigned int width, height, depth, dimension; unsigned int bytes_per_channel, pixmax, put_be; @@ -200,7 +200,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, return AVERROR(ENOMEM); for (z = 0; z < depth; z++) { - in_buf = p->data[0] + p->linesize[0] * (height - 1) + z * bytes_per_channel; + const uint8_t *in_buf = p->data[0] + p->linesize[0] * (height - 1) + z * bytes_per_channel; for (y = 0; y < height; y++) { bytestream2_put_be32(&taboff_pcb, bytestream2_tell_p(&pbc)); @@ -231,7 +231,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, av_free(encode_buf); } else { for (z = 0; z < depth; z++) { - in_buf = p->data[0] + p->linesize[0] * (height - 1) + z * bytes_per_channel; + const uint8_t *in_buf = p->data[0] + p->linesize[0] * (height - 1) + z * bytes_per_channel; for (y = 0; y < height; y++) { for (x = 0; x < width * depth; x += depth) |