summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 60938cf3c2..048edbf0e1 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -287,6 +287,8 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
pkt->pts = pic_out.i_pts;
pkt->dts = pic_out.i_dts;
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
switch (pic_out.i_type) {
case X264_TYPE_IDR:
case X264_TYPE_I:
@@ -300,6 +302,8 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
ctx->coded_frame->pict_type = AV_PICTURE_TYPE_B;
break;
}
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
pkt->flags |= AV_PKT_FLAG_KEY*pic_out.b_keyframe;
if (ret) {
@@ -309,7 +313,11 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
return AVERROR(ENOMEM);
*(int *)sd = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
ctx->coded_frame->quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
}
*got_packet = ret;