[vlc-devel] [PATCH] opengl: apply vflip in nvdec_gl interop

Romain Vimont rom1v at videolabs.io
Sun Jun 28 21:03:50 CEST 2020


The vflip has been forgotten for nvdec_gl interop in commit
1fee4df0606a38d804ddfa0175b5584b7ddc6591.
---
 modules/hw/nvdec/nvdec_gl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/hw/nvdec/nvdec_gl.c b/modules/hw/nvdec/nvdec_gl.c
index 9d994b40cd..3998ad60a3 100644
--- a/modules/hw/nvdec/nvdec_gl.c
+++ b/modules/hw/nvdec/nvdec_gl.c
@@ -163,6 +163,9 @@ static int Open(vlc_object_t *obj)
     if (device == NULL || device->type != VLC_DECODER_DEVICE_NVDEC)
         return VLC_EGENERIC;
 
+    /* The pictures are uploaded upside-down */
+    video_format_TransformBy(&interop->fmt, TRANSFORM_VFLIP);
+
     converter_sys_t *p_sys = vlc_obj_malloc(VLC_OBJECT(interop), sizeof(*p_sys));
     if (unlikely(p_sys == NULL))
     {
-- 
2.27.0



More information about the vlc-devel mailing list