mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-08 08:04:08 +02:00
Fix NV12 video rendering in Picture-in-Picture panel.
This commit is contained in:
parent
3e1cac94bf
commit
4b328a236c
2 changed files with 8 additions and 0 deletions
|
@ -241,6 +241,10 @@ void OverlayWidget::RendererGL::paintTransformedVideoFrame(
|
||||||
_chromaSize,
|
_chromaSize,
|
||||||
yuv->u.stride / (nv12 ? 2 : 1),
|
yuv->u.stride / (nv12 ? 2 : 1),
|
||||||
yuv->u.data);
|
yuv->u.data);
|
||||||
|
if (nv12) {
|
||||||
|
_chromaSize = yuv->chromaSize;
|
||||||
|
_f->glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!nv12) {
|
if (!nv12) {
|
||||||
_f->glActiveTexture(GL_TEXTURE2);
|
_f->glActiveTexture(GL_TEXTURE2);
|
||||||
|
|
|
@ -334,6 +334,10 @@ void Pip::RendererGL::paintTransformedVideoFrame(
|
||||||
_chromaSize,
|
_chromaSize,
|
||||||
yuv->u.stride / (nv12 ? 2 : 1),
|
yuv->u.stride / (nv12 ? 2 : 1),
|
||||||
yuv->u.data);
|
yuv->u.data);
|
||||||
|
if (nv12) {
|
||||||
|
_chromaSize = yuv->chromaSize;
|
||||||
|
_f->glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!nv12) {
|
if (!nv12) {
|
||||||
_f->glActiveTexture(GL_TEXTURE2);
|
_f->glActiveTexture(GL_TEXTURE2);
|
||||||
|
|
Loading…
Add table
Reference in a new issue