From 83257be693967415f1160f2fa37de9de677c1cab Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Tue, 29 Nov 2022 11:18:12 -0800 Subject: vd_lavc: update to handle deprecation of `pkt_duration` This has been replaced by `duration`. --- video/decode/vd_lavc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 4f38b669ec..c65d9d708a 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -1153,7 +1154,11 @@ static int decode_frame(struct mp_filter *vd) mpi->dts = mp_pts_from_av(ctx->pic->pkt_dts, &ctx->codec_timebase); mpi->pkt_duration = +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 30, 100) + mp_pts_from_av(ctx->pic->duration, &ctx->codec_timebase); +#else mp_pts_from_av(ctx->pic->pkt_duration, &ctx->codec_timebase); +#endif av_frame_unref(ctx->pic); -- cgit v1.2.3