/** Tell if the playlist is currently running */
-#define playlist_IsPlaying( pl ) ( pl->status.i_status == PLAYLIST_RUNNING )
+#define playlist_IsPlaying( pl ) ( pl->status.i_status == PLAYLIST_RUNNING && \
+ !(pl->request.b_request && pl->request.i_status == PLAYLIST_STOPPED) )
+
+#define playlist_IsStopped( pl ) ( pl->status.i_status == PLAYLIST_STOPPED || \
+ (pl->request.b_request && pl->request.i_status == PLAYLIST_STOPPED) )
/** Tell if the playlist is empty */
#define playlist_IsEmpty( pl ) ( pl->items.i_size == 0 )
- (void)closeVout
{
playlist_t * p_playlist = pl_Yield( VLCIntf );
+ PL_LOCK;
+ bool stopped = playlist_IsStopped( p_playlist );
+ PL_UNLOCK;
- if(!playlist_IsPlaying( p_playlist ))
+ if(stopped)
[o_window performSelectorOnMainThread: @selector(orderOut:) withObject: self waitUntilDone: YES];
-
+ else
+ msg_Dbg( VLCIntf, "we are not closing the window, playlist is playing" );
+
vlc_object_release( p_playlist );
[super closeVout];
void CloseVideoGL ( vlc_object_t * p_this )
{
vout_thread_t * p_vout = (vout_thread_t *) p_this;
+
+ msg_Dbg( p_this, "Closing" );
+
if( p_vout->p_sys->b_embedded )
{
aglDestroyContext(p_vout->p_sys->agl_ctx);