Commit 5e840db9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: automatically resume from pause when uncorked

(derived from commit ab500430e6dfd02ae4e19ecb9a3d76f3f9486522)
parent 7f525a92
...@@ -83,18 +83,20 @@ static int CorksCallback( vlc_object_t *obj, char const *var, ...@@ -83,18 +83,20 @@ static int CorksCallback( vlc_object_t *obj, char const *var,
if( !old.i_int == !cur.i_int ) if( !old.i_int == !cur.i_int )
return VLC_SUCCESS; /* nothing to do */ return VLC_SUCCESS; /* nothing to do */
if( cur.i_int ) if( !var_InheritBool( obj, "playlist-cork" ) )
{ return VLC_SUCCESS;
if( var_InheritBool( obj, "playlist-cork" ) )
{ input_thread_t *input = playlist_CurrentInput(pl);
msg_Dbg( obj, "corked" ); if( input == NULL )
playlist_Pause( pl ); return VLC_SUCCESS;
}
else bool playing = var_GetInteger(input, "state") == PLAYING_S;
msg_Dbg( obj, "not corked" ); vlc_object_release(input);
} if( playing == !cur.i_int )
else return VLC_SUCCESS;
msg_Dbg( obj, "uncorked" );
msg_Dbg( obj, "%scorked", cur.i_int ? "" : "un" );
playlist_Pause( pl );
(void) var; (void) dummy; (void) var; (void) dummy;
return VLC_SUCCESS; return VLC_SUCCESS;
......
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