[FFmpeg-cvslog] avcoec/snowenc: silence some deprecation warnings
James Almer
git at videolan.org
Sun Aug 27 04:10:48 EEST 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Aug 26 22:08:47 2017 -0300| [257f0d09f7b40050aee9cede5778d4df938dfc86] | committer: James Almer
avcoec/snowenc: silence some deprecation warnings
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=257f0d09f7b40050aee9cede5778d4df938dfc86
---
libavcodec/snowenc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index ca55914d9e..e03877a96c 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1644,8 +1644,12 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
ff_snow_frame_start(s);
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
av_frame_unref(avctx->coded_frame);
ret = av_frame_ref(avctx->coded_frame, s->current_picture);
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
if (ret < 0)
return ret;
@@ -1675,7 +1679,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
s->m.f_code=1;
s->m.pict_type = pic->pict_type;
#if FF_API_MOTION_EST
+FF_DISABLE_DEPRECATION_WARNINGS
s->m.me_method= s->avctx->me_method;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
s->m.motion_est= s->motion_est;
s->m.me.scene_change_score=0;
@@ -1878,10 +1884,14 @@ FF_ENABLE_DEPRECATION_WARNINGS
if(avctx->flags&AV_CODEC_FLAG_PASS1)
ff_write_pass1_stats(&s->m);
s->m.last_pict_type = s->m.pict_type;
+#if FF_API_STAT_BITS
+FF_DISABLE_DEPRECATION_WARNINGS
avctx->frame_bits = s->m.frame_bits;
avctx->mv_bits = s->m.mv_bits;
avctx->misc_bits = s->m.misc_bits;
avctx->p_tex_bits = s->m.p_tex_bits;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
emms_c();
More information about the ffmpeg-cvslog
mailing list