[vlc-devel] [vlc-commits] opengl: forward the error code from the resize callback
Steve Lhomme
robux4 at ycbcr.xyz
Wed Jan 16 12:43:07 CET 2019
ok
On 16/01/2019 12:41, Rémi Denis-Courmont wrote:
> This is obviously wrong since it ends with an assertion failure at
> opengl/display.c:228. And thus the commits before it make no sense.
>
> Please revert all.
>
> Le 16 janvier 2019 12:06:53 GMT+02:00, Steve Lhomme <git at videolan.org>
> a écrit :
>
> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jan 16 10:57:55 2019 +0100| [a28dc3049d06a444d73dd2407efcf4fcff878524] | committer: Steve Lhomme
>
> opengl: forward the error code from the resize callback
>
> And return an error in VOUT_DISPLAY_CHANGE_DISPLAY_SIZE if resizing fails.
>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a28dc3049d06a444d73dd2407efcf4fcff878524
>
>
> ------------------------------------------------------------------------
> include/vlc_opengl.h | 5 +++--
> modules/video_output/opengl/display.c | 3 ++-
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/include/vlc_opengl.h b/include/vlc_opengl.h
> index 25e28934fa..a2e838b699 100644
> --- a/include/vlc_opengl.h
> +++ b/include/vlc_opengl.h
> @@ -96,10 +96,11 @@ static inline void vlc_gl_ReleaseCurrent(vlc_gl_t *gl)
> gl->releaseCurrent(gl);
> }
>
> -static inline void vlc_gl_Resize(vlc_gl_t *gl, unsigned w, unsigned h)
> +static inline int vlc_gl_Resize(vlc_gl_t *gl, unsigned w, unsigned h)
> {
> if (gl->resize != NULL)
> - gl->resize(gl, w, h);
> + return gl->resize(gl, w, h);
> + return VLC_SUCCESS;
> }
>
> static inline void vlc_gl_Swap(vlc_gl_t *gl)
> diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
> index 087e288034..14559110dc 100644
> --- a/modules/video_output/opengl/display.c
> +++ b/modules/video_output/opengl/display.c
> @@ -243,7 +243,8 @@ static int Control (vout_display_t *vd, int query, va_list ap)
> c.align.vertical = VLC_VIDEO_ALIGN_TOP;
>
> vout_display_PlacePicture(&place, src, &c);
> - vlc_gl_Resize (sys->gl, c.display.width, c.display.height);
> + if (vlc_gl_Resize (sys->gl, c.display.width, c.display.height) != VLC_SUCCESS)
> + return VLC_EGENERIC;
> if (vlc_gl_MakeCurrent (sys->gl) != VLC_SUCCESS)
> return VLC_EGENERIC;
> vout_display_opengl_SetWindowAspectRatio(sys->vgl, (float)place.width / place.height);
> ------------------------------------------------------------------------
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
>
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
> excuser ma brièveté.
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list