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