[vlc-devel] [PATCH 2/3] core: vout: add fallback to flat source
Thomas Guillem
thomas at gllm.fr
Wed Nov 16 17:59:34 CET 2016
Fallback to PROJECTION_MODE_RECTANGULAR if there is not display module that can
handle a projection. This is a corner case. Most builds of VLC will have a
opengl display module that will handle the projection mode.
---
src/video_output/display.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index b3fce3c..88e346a 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -109,8 +109,17 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
if (load_module) {
vd->module = module_need(vd, "vout display", module, module && *module != '\0');
if (!vd->module) {
- vlc_object_release(vd);
- return NULL;
+ if (vd->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR)
+ {
+ vd->fmt.projection_mode = PROJECTION_MODE_RECTANGULAR;
+ msg_Warn(vd, "no vout display capable of handling the "
+ "projection mode. Retry by forcing a flat source");
+ vd->module = module_need(vd, "vout display", module, module && *module != '\0');
+ }
+ if (!vd->module) {
+ vlc_object_release(vd);
+ return NULL;
+ }
}
} else {
vd->module = NULL;
--
2.9.3
More information about the vlc-devel
mailing list