]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/xsubdec.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / xsubdec.c
index 87ac9105771caecfd9e16937e46cab11d48d912b..979399bae6e32c36272ae558e989a9d06011b5d5 100644 (file)
@@ -134,20 +134,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr,
             ((uint32_t *)sub->rects[0]->data[1])[i] |= (unsigned)*buf++ << 24;
     }
 
-#if FF_API_AVPICTURE
-FF_DISABLE_DEPRECATION_WARNINGS
-{
-    AVSubtitleRect *rect;
-    int j;
-    rect = sub->rects[0];
-    for (j = 0; j < 4; j++) {
-        rect->pict.data[j] = rect->data[j];
-        rect->pict.linesize[j] = rect->linesize[j];
-    }
-}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     // process RLE-compressed data
     if ((ret = init_get_bits8(&gb, buf, buf_end - buf)) < 0)
         return ret;
@@ -174,7 +160,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
     return buf_size;
 }
 
-AVCodec ff_xsub_decoder = {
+const AVCodec ff_xsub_decoder = {
     .name      = "xsub",
     .long_name = NULL_IF_CONFIG_SMALL("XSUB"),
     .type      = AVMEDIA_TYPE_SUBTITLE,