]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rawenc.c
Deprecate avctx.coded_frame
[ffmpeg] / libavcodec / rawenc.c
index a360c3449698d5fb8e74915ec2c26e96bd5dccbe..cc55b3a875d1eaea65bb7feddba3527ecab01406 100644 (file)
@@ -35,8 +35,12 @@ static av_cold int raw_encode_init(AVCodecContext *avctx)
 {
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
 
+#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);