[vlc-devel] [PATCH 04/17] opengl: remove intermediate local variable
Romain Vimont
rom1v at videolabs.io
Thu Apr 2 14:24:17 CEST 2020
The projection mode can be read from the provided video format. The
intermediate renderer variable is unnecessary.
---
modules/video_output/opengl/vout_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 31b828d64a..fa649c3b94 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -143,7 +143,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
return NULL;
}
- struct vlc_gl_renderer *renderer = vgl->renderer =
+ vgl->renderer =
vlc_gl_renderer_New(gl, &vgl->api, vgl->interop, fmt, b_dump_shaders);
if (!vgl->renderer)
{
@@ -180,7 +180,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
GL_ASSERT_NOERROR(vt);
- if (renderer->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR
+ if (fmt->projection_mode != PROJECTION_MODE_RECTANGULAR
&& vout_display_opengl_SetViewpoint(vgl, viewpoint) != VLC_SUCCESS)
{
vout_display_opengl_Delete(vgl);
--
2.26.0
More information about the vlc-devel
mailing list