diff options
author | sfan5 <sfan5@live.de> | 2021-03-02 15:00:37 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-03-02 15:00:37 +0100 |
commit | bbbf3571edfbb0e849d3ef60148743352b84fe84 (patch) | |
tree | 56ccb93a4bb23411782998e61d00d8fc750b98ee /video/decode/vd_lavc.c | |
parent | 8a7ef58b2de372d3789bcbe7bd81f8040f398451 (diff) | |
download | mpv-bbbf3571edfbb0e849d3ef60148743352b84fe84.tar.bz2 mpv-bbbf3571edfbb0e849d3ef60148743352b84fe84.tar.xz |
vd_lavc: wrap use of deprecated AVCodecContext.thread_safe_callbacks in #if
For compatibility once FFmpeg removes it entirely.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |