]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ljpegenc.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / ljpegenc.c
index 9a107e85ce5b51d96502b061b7c409aee25caeb4..80b5e799ed9c035962c3d892fec5d5e1b5b42d3a 100644 (file)
@@ -281,13 +281,6 @@ static av_cold int ljpeg_encode_init(AVCodecContext *avctx)
     if (ret < 0)
         return ret;
 
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-    avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     s->scratch = av_malloc_array(avctx->width + 1, sizeof(*s->scratch));
     if (!s->scratch)
         return AVERROR(ENOMEM);
@@ -328,7 +321,7 @@ static const AVClass ljpeg_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
-AVCodec ff_ljpeg_encoder = {
+const AVCodec ff_ljpeg_encoder = {
     .name           = "ljpeg",
     .long_name      = NULL_IF_CONFIG_SMALL("Lossless JPEG"),
     .type           = AVMEDIA_TYPE_VIDEO,