vd_lavc: wrap use of deprecated AVCodecContext.thread_safe_callbacks in #if

For compatibility once FFmpeg removes it entirely.
This commit is contained in:
sfan5 2021-03-02 15:00:37 +01:00
parent 8a7ef58b2d
commit bbbf3571ed
1 changed files with 2 additions and 0 deletions

View File

@ -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;