]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rawenc.c
Deprecate avctx.coded_frame
[ffmpeg] / libavcodec / rawenc.c
index bca0d08b7ad1808bcbde185d08b96ba4ede876bc..cc55b3a875d1eaea65bb7feddba3527ecab01406 100644 (file)
@@ -35,9 +35,12 @@ static av_cold int raw_encode_init(AVCodecContext *avctx)
 {
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
 
-    avctx->coded_frame            = avctx->priv_data;
+#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
     avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc);
     if(!avctx->codec_tag)
         avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);
@@ -74,7 +77,6 @@ AVCodec ff_rawvideo_encoder = {
     .long_name      = NULL_IF_CONFIG_SMALL("raw video"),
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_RAWVIDEO,
-    .priv_data_size = sizeof(AVFrame),
     .init           = raw_encode_init,
     .encode2        = raw_encode,
 };