vd_lavc: hide a deprecation warning in already handled compatible code

The field has been deprecated, yet the upcoming new default is not yet
the default. Thus, until lavc major hits 60 and the default behavior
finally gets changed, we have to explicitly set the field's value.

The deprecation had already been handled by adding the required
version limitation for this code in bbbf3571ed ,
this change merely just removes the warning which would otherwise
appear until lavc major version gets bumped to 60.
This commit is contained in:
Jan Ekström 2022-04-02 20:44:00 +03:00
parent fb7b66ecf1
commit 083ae8e736
1 changed files with 3 additions and 1 deletions

View File

@ -675,7 +675,9 @@ static void init_avctx(struct mp_filter *vd)
avctx->opaque = vd;
avctx->get_buffer2 = get_buffer2_direct;
#if LIBAVCODEC_VERSION_MAJOR < 60
avctx->thread_safe_callbacks = 1;
AV_NOWARN_DEPRECATED({
avctx->thread_safe_callbacks = 1;
});
#endif
}