[vlc-devel] [PATCH] libvlc: add a bool return value to the resize callback
Steve Lhomme
robux4 at ycbcr.xyz
Thu Nov 15 14:20:28 CET 2018
For some reason it may be impossible to the host to provide a context with the
given size.
---
include/vlc/libvlc_media_player.h | 3 ++-
modules/video_output/vgl.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 73dadda3ba..987fd40c9d 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -446,9 +446,10 @@ typedef void (*libvlc_gl_cleanup_cb)(void* opaque);
* \param opaque private pointer passed to the @a libvlc_video_set_opengl_callbacks() [IN]
* \param width video width in pixel [IN]
* \param height video height in pixel [IN]
+ * \return true on success
* \version LibVLC 4.0.0 or later
*/
-typedef void (*libvlc_gl_resize_cb)(void* opaque, unsigned width, unsigned height);
+typedef bool (*libvlc_gl_resize_cb)(void* opaque, unsigned width, unsigned height);
/**
diff --git a/modules/video_output/vgl.c b/modules/video_output/vgl.c
index 6a69a3751e..1a1d537edc 100644
--- a/modules/video_output/vgl.c
+++ b/modules/video_output/vgl.c
@@ -33,7 +33,7 @@ struct vout_display_sys_t
{
void (*cleanupCb)(void* opaque);
bool (*setupCb)(void* opaque);
- void (*resizeCb)(void* opaque, unsigned, unsigned);
+ bool (*resizeCb)(void* opaque, unsigned, unsigned);
void (*swapCb)(void* opaque);
bool (*makeCurrentCb)(void* opaque, bool);
void* (*getProcAddressCb)(void* opaque, const char *name);
--
2.17.1
More information about the vlc-devel
mailing list