Fix get_buffer2() thread-safety warning with FFmpeg 4.4

This commit is contained in:
Cameron Gutman
2021-11-29 19:45:28 +03:00
parent 80604a752b
commit 56a5fbf63b

View File

@@ -109,6 +109,11 @@ bool DXVA2Renderer::prepareDecoderContext(AVCodecContext* context, AVDictionary*
context->hwaccel_context = &m_DXVAContext;
context->get_buffer2 = ffGetBuffer2;
#if LIBAVCODEC_VERSION_MAJOR < 60
AV_NOWARN_DEPRECATED(
context->thread_safe_callbacks = 1;
)
#endif
m_Pool = av_buffer_pool_init2(ARRAYSIZE(m_DecSurfaces), this, ffPoolAlloc, nullptr);
if (!m_Pool) {