[vlc-commits] video_output: ignore vouts that can't handle 360 video unless forced

Steve Lhomme git at videolan.org
Wed Aug 9 15:34:04 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri Jul 28 18:41:01 2017 +0200| [862111347687ad4c49aac68a94487c7ef88c58ba] | committer: Jean-Baptiste Kempf

video_output: ignore vouts that can't handle 360 video unless forced

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/win32/direct3d9.c  | 3 +++
 modules/video_output/win32/directdraw.c | 3 +++
 modules/video_output/win32/wingdi.c     | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 9da418a542..92b3ffc670 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -228,6 +228,9 @@ static int Open(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
 
+    if ( !vd->obj.force && vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR)
+        return VLC_EGENERIC; /* let a module who can handle it do it */
+
     OSVERSIONINFO winVer;
     winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
     if(GetVersionEx(&winVer) && winVer.dwMajorVersion < 6 && !object->obj.force)
diff --git a/modules/video_output/win32/directdraw.c b/modules/video_output/win32/directdraw.c
index 0e6f568f64..34feb8f578 100644
--- a/modules/video_output/win32/directdraw.c
+++ b/modules/video_output/win32/directdraw.c
@@ -199,6 +199,9 @@ static int Open(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
 
+    if ( !vd->obj.force && vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR)
+        return VLC_EGENERIC; /* let a module who can handle it do it */
+
     /* Allocate structure */
     vd->sys = sys = calloc(1, sizeof(*sys));
     if (!sys)
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index 04cfb5855c..2730a42791 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -91,6 +91,9 @@ static int Open(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
 
+    if ( !vd->obj.force && vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR)
+        return VLC_EGENERIC; /* let a module who can handle it do it */
+
     vd->sys = sys = calloc(1, sizeof(*sys));
     if (!sys)
         return VLC_ENOMEM;



More information about the vlc-commits mailing list