]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/screenpresso.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / screenpresso.c
index 5fac100897079a4378f4c9ffd28a2346c68826af..dd4df6d405bf944117bb376655981767619505a1 100644 (file)
@@ -94,8 +94,9 @@ static void sum_delta_flipped(uint8_t       *dst, int dst_linesize,
 {
     int i;
     for (; height > 0; height--) {
+        const uint8_t *src1 = &src[(height - 1) * src_linesize];
         for (i = 0; i < bytewidth; i++)
-            dst[i] += src[(height - 1) * src_linesize + i];
+            dst[i] += src1[i];
         dst += dst_linesize;
     }
 }
@@ -182,7 +183,7 @@ static int screenpresso_decode_frame(AVCodecContext *avctx, void *data,
     return avpkt->size;
 }
 
-AVCodec ff_screenpresso_decoder = {
+const AVCodec ff_screenpresso_decoder = {
     .name           = "screenpresso",
     .long_name      = NULL_IF_CONFIG_SMALL("Screenpresso"),
     .type           = AVMEDIA_TYPE_VIDEO,