mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Fix get_buffer2() thread-safety warning with FFmpeg 4.4
This commit is contained in:
@@ -109,6 +109,11 @@ bool DXVA2Renderer::prepareDecoderContext(AVCodecContext* context, AVDictionary*
|
|||||||
context->hwaccel_context = &m_DXVAContext;
|
context->hwaccel_context = &m_DXVAContext;
|
||||||
|
|
||||||
context->get_buffer2 = ffGetBuffer2;
|
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);
|
m_Pool = av_buffer_pool_init2(ARRAYSIZE(m_DecSurfaces), this, ffPoolAlloc, nullptr);
|
||||||
if (!m_Pool) {
|
if (!m_Pool) {
|
||||||
|
|||||||
Reference in New Issue
Block a user