Fixes a crash when changing deinterlace filter during pause and then pressing a hotkey (like play-pause). In this case the old vout is destroyed, but the new vout has not received an image yet and has therefore not spawned the new window yet.
We want to keep the possibility of using ESC to leave fullscreen if required, So I don't think we should disable key events all together in this rare case.
[self toggleFullscreen];
}
}
- else if ( key == ' ' )
+ else if ( p_vout )
{
vlc_value_t val;
- val.i_int = config_GetInt( p_vout, "key-play-pause" );
- var_Set( p_vout->p_libvlc, "key-pressed", val );
- }
- else
- {
- val.i_int |= CocoaKeyToVLC( key );
+ if( key == ' ')
+ val.i_int = config_GetInt( p_vout, "key-play-pause" );
+ else
+ val.i_int |= CocoaKeyToVLC( key );
var_Set( p_vout->p_libvlc, "key-pressed", val );
}
+ else NSLog( @"Could not send keyevent to VLC core" );
}
else
{