Fix colorspace conversion with SDL as frontend renderer

This commit is contained in:
Cameron Gutman 2019-12-14 17:17:29 -08:00
parent 801adb6af7
commit 6230a99360

View file

@ -270,6 +270,11 @@ void SdlRenderer::renderFrame(AVFrame* frame)
goto Exit;
}
// av_hwframe_transfer_data() can nuke frame metadata,
// so anything other than width, height, and format must
// be set *after* calling av_hwframe_transfer_data().
swFrame->colorspace = frame->colorspace;
frame = swFrame;
}