[vlc-commits] opengl: ignore resize control failure
Rémi Denis-Courmont
git at videolan.org
Mon Apr 1 19:46:07 CEST 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 1 19:54:11 2019 +0300| [dad0b92fd924a0c9ac791442a49567abf8ecae47] | committer: Rémi Denis-Courmont
opengl: ignore resize control failure
Resetting pictures would crash. If setting the current GL context fails,
we are pretty screwed as far as rendering is concerned, but that's not a
reason to crash the process.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dad0b92fd924a0c9ac791442a49567abf8ecae47
---
modules/video_output/macosx.m | 2 +-
modules/video_output/opengl/display.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index e44e4f526e..37bde8d1bf 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -378,7 +378,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
}
if (vlc_gl_MakeCurrent (sys->gl) != VLC_SUCCESS)
- return VLC_EGENERIC;
+ return VLC_SUCCESS;
vout_display_opengl_SetWindowAspectRatio(sys->vgl, (float)place.width / place.height);
/* For resize, we call glViewport in reshape and not here.
diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index fabd43df94..e126054739 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -242,7 +242,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
vout_display_PlacePicture(&place, src, &c);
vlc_gl_Resize (sys->gl, c.display.width, c.display.height);
if (vlc_gl_MakeCurrent (sys->gl) != VLC_SUCCESS)
- return VLC_EGENERIC;
+ return VLC_SUCCESS;
vout_display_opengl_SetWindowAspectRatio(sys->vgl, (float)place.width / place.height);
vout_display_opengl_Viewport(sys->vgl, place.x, place.y, place.width, place.height);
vlc_gl_ReleaseCurrent (sys->gl);
@@ -257,7 +257,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
vout_display_PlacePicture(&place, &vd->source, cfg);
if (vlc_gl_MakeCurrent (sys->gl) != VLC_SUCCESS)
- return VLC_EGENERIC;
+ return VLC_SUCCESS;
vout_display_opengl_SetWindowAspectRatio(sys->vgl, (float)place.width / place.height);
vout_display_opengl_Viewport(sys->vgl, place.x, place.y, place.width, place.height);
vlc_gl_ReleaseCurrent (sys->gl);
More information about the vlc-commits
mailing list