Commit 832c43c6 authored by David Fuhrmann's avatar 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.
parent 393761ab
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
BOOL b_nativeFullscreenMode = [[VLCMain sharedInstance] nativeFullscreenMode]; BOOL b_nativeFullscreenMode = [[VLCMain sharedInstance] nativeFullscreenMode];
BOOL b_video_deco = var_InheritBool(VLCIntf, "video-deco"); BOOL b_video_deco = var_InheritBool(VLCIntf, "video-deco");
BOOL b_video_wallpaper = var_InheritBool(VLCIntf, "video-wallpaper"); BOOL b_video_wallpaper = var_InheritBool(VLCIntf, "video-wallpaper");
BOOL b_multiple_vout_windows = [o_vout_dict count] > 0;
VLCVoutView *o_vout_view; VLCVoutView *o_vout_view;
VLCVideoWindowCommon *o_new_video_window; VLCVideoWindowCommon *o_new_video_window;
...@@ -106,7 +107,7 @@ ...@@ -106,7 +107,7 @@
[[VLCMainWindow sharedInstance] setNonembedded:YES]; [[VLCMainWindow sharedInstance] setNonembedded:YES];
b_nonembedded = YES; b_nonembedded = YES;
} else { } 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_vout_view = [[[VLCMainWindow sharedInstance] videoView] retain];
o_new_video_window = [[VLCMainWindow sharedInstance] retain]; o_new_video_window = [[VLCMainWindow sharedInstance] retain];
b_nonembedded = NO; b_nonembedded = NO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment