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/fitsenc.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/fitsenc.c')
-rw-r--r-- | libavcodec/fitsenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/fitsenc.c b/libavcodec/fitsenc.c index 6e0597c8ca..30395b0a43 100644 --- a/libavcodec/fitsenc.c +++ b/libavcodec/fitsenc.c @@ -38,7 +38,7 @@ static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *p, int *got_packet) { - uint8_t *bytestream, *ptr; + uint8_t *bytestream; const uint16_t flip = (1 << 15); uint64_t data_size = 0, padded_data_size = 0; int ret, bitpix, naxis3 = 1, i, j, k, bytes_left; @@ -87,7 +87,7 @@ static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt, for (k = 0; k < naxis3; k++) { for (i = 0; i < avctx->height; i++) { - ptr = p->data[map[k]] + (avctx->height - i - 1) * p->linesize[map[k]]; + const uint8_t *ptr = p->data[map[k]] + (avctx->height - i - 1) * p->linesize[map[k]]; if (bitpix == 16) { for (j = 0; j < avctx->width; j++) { // subtracting bzero is equivalent to first bit flip |