summaryrefslogtreecommitdiff
path: root/libavcodec/pnmenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/pnmenc.c')
-rw-r--r--libavcodec/pnmenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index 58fd4fee06..055aff44e8 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -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;
}