]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pnmenc.c
Deprecate avctx.coded_frame
[ffmpeg] / libavcodec / pnmenc.c
index 58fd4fee06554c44aa9739456b5f9a4caa9f0d9c..055aff44e8886ffe7f916c31b341a0a2eaaec217 100644 (file)
@@ -120,8 +120,12 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
 static av_cold int pnm_encode_init(AVCodecContext *avctx)
 {
+#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
 
     return 0;
 }