[vlc-commits] vout_macosx: fix prerequisite check in Control() (close #7937)

Felix Paul Kühne git at videolan.org
Mon Apr 29 20:33:43 CEST 2013


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Apr 10 17:07:08 2013 +0200| [0731d12c31b6a964e0c5445183263192f2064b15] | committer: Felix Paul Kühne

vout_macosx: fix prerequisite check in Control() (close #7937)
(cherry picked from commit ba534e5c56e1d4d3d3bb37fe23b32615e36171ff)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=0731d12c31b6a964e0c5445183263192f2064b15
---

 modules/video_output/macosx.m |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 336541a..6aca508 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -315,6 +315,12 @@ static int Control (vout_display_t *vd, int query, va_list ap)
 {
     vout_display_sys_t *sys = vd->sys;
 
+    if (!vd->sys)
+        return VLC_EGENERIC;
+
+    if (!sys->embed)
+        return VLC_EGENERIC;
+
     switch (query)
     {
         case VOUT_DISPLAY_CHANGE_FULLSCREEN:
@@ -336,9 +342,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
         case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
         case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
         {
-            if (!vd->sys)
-                return VLC_EGENERIC;
-
             NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
 
             id o_window = [sys->glView window];



More information about the vlc-commits mailing list