When going to fast to fullscreen/windowed-mode VLC can still crash (now at vout.m:375), but that scenario isn't realistic because you need to perform this function at least 5 to 10 times per second to get this done.
p_fullscreen_state = NULL;
p_real_vout = [VLCVoutView getRealVout: p_vout];
i_device = var_GetInteger( p_real_vout->p_vlc, "video-device" );
p_fullscreen_state = NULL;
p_real_vout = [VLCVoutView getRealVout: p_vout];
i_device = var_GetInteger( p_real_vout->p_vlc, "video-device" );
+ b_black = var_GetBool( p_real_vout->p_vlc, "macosx-black" );
/* Find out on which screen to open the window */
if( i_device <= 0 || i_device > (int)[o_screens count] )
/* Find out on which screen to open the window */
if( i_device <= 0 || i_device > (int)[o_screens count] )
defer: YES screen: o_screen];
if( var_GetBool( p_real_vout, "macosx-black" ) )
defer: YES screen: o_screen];
if( var_GetBool( p_real_vout, "macosx-black" ) )
+ if( b_black == VLC_TRUE )
{
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 0.5, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, true );
{
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 0.5, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, true );
BeginFullScreen( &p_fullscreen_state, NULL, 0, 0,
NULL, NULL, fullScreenAllowEvents );
}
BeginFullScreen( &p_fullscreen_state, NULL, 0, 0,
NULL, NULL, fullScreenAllowEvents );
}
- if( var_GetBool( p_real_vout, "macosx-black" ) )
+ if( b_black == VLC_TRUE )
+ //if( var_GetBool( p_real_vout, "macosx-black" ) )
{
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 2 , kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
{
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 2 , kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
{
if( p_fullscreen_state )
EndFullScreen( p_fullscreen_state, 0 );
{
if( p_fullscreen_state )
EndFullScreen( p_fullscreen_state, 0 );
- if( var_GetBool( p_vout, "macosx-black" ) )
+ if( b_black == VLC_TRUE )
+ //if( var_GetBool( p_vout, "macosx-black" ) )
{
CGDisplayFadeReservationToken token;
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
{
CGDisplayFadeReservationToken token;
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);