[vlc-commits] macosx: add basic support for multiple vout windows in embedded case

David Fuhrmann git at videolan.org
Sat Oct 27 13:36:56 CEST 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Oct 27 12:45:01 2012 +0200| [832c43c64543a9cc8aeb5f1c4c5d60dcbe43761d] | committer: David Fuhrmann

macosx: add basic support for multiple vout windows in embedded case

This fixes crashes which occured when trying to open the second vout.

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

 modules/gui/macosx/VLCVoutWindowController.m |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index 327f1c3..082d7b1 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -53,6 +53,7 @@
     BOOL b_nativeFullscreenMode = [[VLCMain sharedInstance] nativeFullscreenMode];
     BOOL b_video_deco = var_InheritBool(VLCIntf, "video-deco");
     BOOL b_video_wallpaper = var_InheritBool(VLCIntf, "video-wallpaper");
+    BOOL b_multiple_vout_windows = [o_vout_dict count] > 0;
     VLCVoutView *o_vout_view;
     VLCVideoWindowCommon *o_new_video_window;
 
@@ -106,7 +107,7 @@
         [[VLCMainWindow sharedInstance] setNonembedded:YES];
         b_nonembedded = YES;
     } else {
-        if (var_InheritBool(VLCIntf, "embedded-video") || b_nativeFullscreenMode) {
+        if ((var_InheritBool(VLCIntf, "embedded-video") && !b_multiple_vout_windows) || b_nativeFullscreenMode) {
             o_vout_view = [[[VLCMainWindow sharedInstance] videoView] retain];
             o_new_video_window = [[VLCMainWindow sharedInstance] retain];
             b_nonembedded = NO;



More information about the vlc-commits mailing list