]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/arbc.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / arbc.c
index bce4a4c96d19f6ff185e530887b2f1125286c558..c4fc30e047a7ea1f23f34e8b9741d54c3c42cba3 100644 (file)
@@ -94,6 +94,9 @@ static int fill_tileX(AVCodecContext *avctx, int tile_width, int tile_height,
         int start_y = y * tile_height, start_x = x * tile_width;
         int end_y = start_y + tile_height, end_x = start_x + tile_width;
 
+        if (start_x >= avctx->width || start_y >= avctx->height)
+            continue;
+
         for (int j = start_y; j < end_y; j += step_h) {
             for (int k = start_x; k < end_x; k += step_w) {
                 if (mask & 0x8000U) {
@@ -209,7 +212,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
     return 0;
 }
 
-AVCodec ff_arbc_decoder = {
+const AVCodec ff_arbc_decoder = {
     .name           = "arbc",
     .long_name      = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"),
     .type           = AVMEDIA_TYPE_VIDEO,