From bbbf3571edfbb0e849d3ef60148743352b84fe84 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 2 Mar 2021 15:00:37 +0100 Subject: vd_lavc: wrap use of deprecated AVCodecContext.thread_safe_callbacks in #if For compatibility once FFmpeg removes it entirely. --- video/decode/vd_lavc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 15eab18bf9..eae5f7a69a 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -661,7 +661,9 @@ static void init_avctx(struct mp_filter *vd) if (!ctx->use_hwdec && ctx->vo && lavc_param->dr) { avctx->opaque = vd; avctx->get_buffer2 = get_buffer2_direct; +#if LIBAVCODEC_VERSION_MAJOR < 60 avctx->thread_safe_callbacks = 1; +#endif } avctx->flags |= lavc_param->bitexact ? AV_CODEC_FLAG_BITEXACT : 0; -- cgit v1.2.3