Commit 85c5476d authored by Rémi Duraffort's avatar Rémi Duraffort

Fix 0448c670 as I forgot to use pl_Yield...

Fix 0448c670 as I forgot to use pl_Yield instead of vlc_object_find.
And fix some other use of vlc_object_find for the playlist.
parent 6a34da50
...@@ -439,15 +439,14 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -439,15 +439,14 @@ static int Manage( vout_thread_t *p_vout )
val.b_bool = true; val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val ); var_Set( p_vout, "mouse-clicked", val );
p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST, p_playlist = pl_Yield( p_vout );
FIND_ANYWHERE );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
vlc_value_t val; vlc_value_t val;
val.b_bool = false; val.b_bool = false;
var_Set( p_playlist, "intf-popupmenu", val ); var_Set( p_playlist, "intf-popupmenu", val );
vlc_object_release( p_playlist ); pl_Release( p_playlist );
} }
} }
break; break;
...@@ -460,15 +459,14 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -460,15 +459,14 @@ static int Manage( vout_thread_t *p_vout )
val.i_int &= ~2; val.i_int &= ~2;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST, p_playlist = pl_Yield( p_vout );
FIND_ANYWHERE );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
vlc_value_t val; vlc_value_t val;
var_Get( p_playlist, "intf-show", &val ); var_Get( p_playlist, "intf-show", &val );
val.b_bool = !val.b_bool; val.b_bool = !val.b_bool;
var_Set( p_playlist, "intf-show", val ); var_Set( p_playlist, "intf-show", val );
vlc_object_release( p_playlist ); pl_Release( p_playlist );
} }
} }
break; break;
...@@ -489,15 +487,14 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -489,15 +487,14 @@ static int Manage( vout_thread_t *p_vout )
vlc_object_release( p_intf ); vlc_object_release( p_intf );
} }
p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST, p_playlist = pl_Yield( p_vout );
FIND_ANYWHERE );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
vlc_value_t val; vlc_value_t val;
val.b_bool = true; val.b_bool = true;
var_Set( p_playlist, "intf-popupmenu", val ); var_Set( p_playlist, "intf-popupmenu", val );
vlc_object_release( p_playlist ); pl_Release( p_playlist );
} }
} }
break; break;
...@@ -537,11 +534,11 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -537,11 +534,11 @@ static int Manage( vout_thread_t *p_vout )
/* Quit event (close the window) */ /* Quit event (close the window) */
case SDL_QUIT: case SDL_QUIT:
{ {
playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); playlist_t *p_playlist = pl_Yield( p_vout );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
vlc_object_release( p_playlist ); pl_Release( p_playlist );
} }
} }
break; break;
......
...@@ -1300,14 +1300,12 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1300,14 +1300,12 @@ static int ManageVideo( vout_thread_t *p_vout )
val.b_bool = true; val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val ); var_Set( p_vout, "mouse-clicked", val );
p_playlist = vlc_object_find( p_vout, p_playlist = pl_Yield( p_vout );
VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
vlc_value_t val; val.b_bool = false; vlc_value_t val; val.b_bool = false;
var_Set( p_playlist, "intf-popupmenu", val ); var_Set( p_playlist, "intf-popupmenu", val );
vlc_object_release( p_playlist ); pl_Release( p_playlist );
} }
} }
break; break;
...@@ -1320,16 +1318,14 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1320,16 +1318,14 @@ static int ManageVideo( vout_thread_t *p_vout )
val.i_int &= ~2; val.i_int &= ~2;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
p_playlist = vlc_object_find( p_vout, p_playlist = pl_Yield( p_vout );
VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
vlc_value_t val; vlc_value_t val;
var_Get( p_playlist, "intf-show", &val ); var_Get( p_playlist, "intf-show", &val );
val.b_bool = !val.b_bool; val.b_bool = !val.b_bool;
var_Set( p_playlist, "intf-show", val ); var_Set( p_playlist, "intf-show", val );
vlc_object_release( p_playlist ); pl_Release( p_playlist );
} }
} }
break; break;
...@@ -1350,14 +1346,12 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1350,14 +1346,12 @@ static int ManageVideo( vout_thread_t *p_vout )
vlc_object_release( p_intf ); vlc_object_release( p_intf );
} }
p_playlist = vlc_object_find( p_vout, p_playlist = pl_Yield( p_vout );
VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
vlc_value_t val; val.b_bool = true; vlc_value_t val; val.b_bool = true;
var_Set( p_playlist, "intf-popupmenu", val ); var_Set( p_playlist, "intf-popupmenu", val );
vlc_object_release( p_playlist ); pl_Release( p_playlist );
} }
} }
break; break;
...@@ -1488,13 +1482,11 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1488,13 +1482,11 @@ static int ManageVideo( vout_thread_t *p_vout )
== p_vout->p_sys->p_win->wm_delete_window ) ) == p_vout->p_sys->p_win->wm_delete_window ) )
{ {
/* the user wants to close the window */ /* the user wants to close the window */
playlist_t * p_playlist = playlist_t * p_playlist = pl_Yield( p_vout );
(playlist_t *)vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
vlc_object_release( p_playlist ); pl_Release( p_playlist );
} }
} }
} }
......
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