diff options
Diffstat (limited to 'video/decode')
-rw-r--r-- | video/decode/vd_lavc.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <stdbool.h> #include <libavcodec/avcodec.h> +#include <libavformat/version.h> #include <libavutil/common.h> #include <libavutil/hwcontext.h> #include <libavutil/opt.h> @@ -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); |