[vlc-commits] glwin32: pass the output video format directly to vout_display_opengl_New

Steve Lhomme git at videolan.org
Wed Sep 2 09:56:23 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Sep  2 09:06:45 2020 +0200| [bf85618b933425e797004dbeeb175ae9b555a90d] | committer: Steve Lhomme

glwin32: pass the output video format directly to vout_display_opengl_New

This is what other callers are doing. The format is only set when there are no
errors.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf85618b933425e797004dbeeb175ae9b555a90d
---

 modules/video_output/win32/glwin32.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 434801ea0d..7b4e0d9c95 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -146,11 +146,10 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
 
     vlc_gl_Resize (sys->gl, cfg->display.width, cfg->display.height);
 
-    video_format_t fmt = *fmtp;
     const vlc_fourcc_t *subpicture_chromas;
     if (vlc_gl_MakeCurrent (sys->gl))
         goto error;
-    sys->vgl = vout_display_opengl_New(&fmt, &subpicture_chromas, sys->gl,
+    sys->vgl = vout_display_opengl_New(fmtp, &subpicture_chromas, sys->gl,
                                        &cfg->viewpoint, context);
     vlc_gl_ReleaseCurrent (sys->gl);
     if (!sys->vgl)
@@ -159,8 +158,6 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     /* Setup vout_display now that everything is fine */
     vd->info.subpicture_chromas = subpicture_chromas;
 
-    *fmtp    = fmt;
-
     vd->prepare = Prepare;
     vd->display = Display;
     vd->control = Control;



More information about the vlc-commits mailing list