summaryrefslogtreecommitdiff
path: root/libavcodec/flashsvenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-26 09:09:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-05 03:21:41 +0200
commit5828e8209f48f206c42b69e314a6988b50e98924 (patch)
treeb1ce7a4fdbafb8e2ec3706340736812dae042016 /libavcodec/flashsvenc.c
parentcee40a945abc3568e270899eefb8bf6cf7e5ab3c (diff)
avcodec: Constify frame->data pointers for encoders where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/flashsvenc.c')
-rw-r--r--libavcodec/flashsvenc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 12db53bb8f..30c4e43154 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -66,16 +66,15 @@ typedef struct FlashSVContext {
uint8_t tmpblock[3 * 256 * 256];
} FlashSVContext;
-static int copy_region_enc(uint8_t *sptr, uint8_t *dptr, int dx, int dy,
+static int copy_region_enc(const uint8_t *sptr, uint8_t *dptr, int dx, int dy,
int h, int w, int stride, uint8_t *pfptr)
{
int i, j;
- uint8_t *nsptr;
uint8_t *npfptr;
int diff = 0;
for (i = dx + h; i > dx; i--) {
- nsptr = sptr + i * stride + dy * 3;
+ const uint8_t *nsptr = sptr + i * stride + dy * 3;
npfptr = pfptr + i * stride + dy * 3;
for (j = 0; j < w * 3; j++) {
diff |= npfptr[j] ^ nsptr[j];