Fix native Vulkan video decoding (non-imported frames)

This commit is contained in:
Cameron Gutman 2023-12-16 16:21:54 -06:00
parent d75663052d
commit c74c4ef041

View file

@ -333,9 +333,10 @@ bool PlVkRenderer::prepareDecoderContext(AVCodecContext *context, AVDictionary *
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Using Vulkan video decoding");
if (m_Backend) {
context->hw_device_ctx = av_buffer_ref(m_HwDeviceCtx);
}
// This should only be called when we're acting as the decoder backend
SDL_assert(m_Backend == nullptr);
context->hw_device_ctx = av_buffer_ref(m_HwDeviceCtx);
return true;
}