vlc | branch: master | Steve Lhomme <[email protected]> | Thu Oct 24 10:57:49 
2019 +0200| [2d7de42575ebfe6c1e8258cd2cc6efa829e38ab1] | committer: Steve Lhomme

caopengllayer: do not return an error when crop/zoom/aspect/etc fail

Otherwise the core will call VOUT_DISPLAY_RESET_PICTURES which we don't support.

This is what is done in macosx.m when vlc_gl_MakeCurrent() fails.

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

 modules/video_output/caopengllayer.m | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/caopengllayer.m 
b/modules/video_output/caopengllayer.m
index 3b542d1e63..57af6a01ff 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -343,8 +343,9 @@ static int Control (vout_display_t *vd, int query, va_list 
ap)
 
             vout_display_place_t place;
             vout_display_PlacePicture(&place, &vd->source, &cfg_tmp);
-            if (OpenglLock(sys->gl))
-                return VLC_EGENERIC;
+            if (unlikely(OpenglLock(sys->gl)))
+                // don't return an error or we need to handle 
VOUT_DISPLAY_RESET_PICTURES
+                return VLC_SUCCESS;
 
             vout_display_opengl_SetWindowAspectRatio(sys->vgl, 
(float)place.width / place.height);
             OpenglUnlock(sys->gl);

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to