mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-16 08:17:58 +00:00
Add NV21 pixel format support to SDL renderer
This commit is contained in:
parent
e6a48481a5
commit
99d9de35de
1 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,8 @@
|
|||
|
||||
const std::vector<int> SdlRenderer::k_SwFormats({
|
||||
AV_PIX_FMT_YUV420P,
|
||||
AV_PIX_FMT_NV12
|
||||
AV_PIX_FMT_NV12,
|
||||
AV_PIX_FMT_NV21
|
||||
});
|
||||
|
||||
SdlRenderer::SdlRenderer()
|
||||
|
@ -285,6 +286,9 @@ void SdlRenderer::renderFrame(AVFrame* frame)
|
|||
case AV_PIX_FMT_NV12:
|
||||
sdlFormat = SDL_PIXELFORMAT_NV12;
|
||||
break;
|
||||
case AV_PIX_FMT_NV21:
|
||||
sdlFormat = SDL_PIXELFORMAT_NV21;
|
||||
break;
|
||||
default:
|
||||
SDL_assert(false);
|
||||
goto Exit;
|
||||
|
|
Loading…
Reference in a new issue