diff --git a/app/streaming/video/ffmpeg-renderers/sdlvid.cpp b/app/streaming/video/ffmpeg-renderers/sdlvid.cpp index 3abd4f44..d335e02e 100644 --- a/app/streaming/video/ffmpeg-renderers/sdlvid.cpp +++ b/app/streaming/video/ffmpeg-renderers/sdlvid.cpp @@ -282,6 +282,18 @@ void SdlRenderer::renderFrame(AVFrame* frame) goto Exit; } + switch (frame->colorspace) + { + case AVCOL_SPC_BT709: + SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_BT709); + break; + case AVCOL_SPC_BT470BG: + case AVCOL_SPC_SMPTE170M: + default: + SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_BT601); + break; + } + m_Texture = SDL_CreateTexture(m_Renderer, sdlFormat, SDL_TEXTUREACCESS_STREAMING, diff --git a/moonlight-common-c/moonlight-common-c b/moonlight-common-c/moonlight-common-c index f5ae5df5..e60a7ef7 160000 --- a/moonlight-common-c/moonlight-common-c +++ b/moonlight-common-c/moonlight-common-c @@ -1 +1 @@ -Subproject commit f5ae5df5d0689084293dbce3c20a6ff2322c9c2c +Subproject commit e60a7ef75f02559e7c5271f4e08f815af5f4a8cc