Fix NV12 video rendering in Picture-in-Picture panel.

This commit is contained in:
John Preston 2022-03-28 17:39:25 +04:00
parent 3e1cac94bf
commit 4b328a236c
2 changed files with 8 additions and 0 deletions

View file

@ -241,6 +241,10 @@ void OverlayWidget::RendererGL::paintTransformedVideoFrame(
_chromaSize,
yuv->u.stride / (nv12 ? 2 : 1),
yuv->u.data);
if (nv12) {
_chromaSize = yuv->chromaSize;
_f->glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
}
}
if (!nv12) {
_f->glActiveTexture(GL_TEXTURE2);

View file

@ -334,6 +334,10 @@ void Pip::RendererGL::paintTransformedVideoFrame(
_chromaSize,
yuv->u.stride / (nv12 ? 2 : 1),
yuv->u.data);
if (nv12) {
_chromaSize = yuv->chromaSize;
_f->glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
}
}
if (!nv12) {
_f->glActiveTexture(GL_TEXTURE2);