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

Qt4: remove useless alive check on input

If the input dies, the state changes and the Qt input manager will
delete the input anyway.

Note that checking b_eof and b_dead here is also wrong (no memory
synchronization), but that is left for later.
parent d19dee0c
...@@ -648,11 +648,9 @@ bool PLModel::canEdit() const ...@@ -648,11 +648,9 @@ bool PLModel::canEdit() const
void PLModel::processInputItemUpdate( input_thread_t *p_input ) void PLModel::processInputItemUpdate( input_thread_t *p_input )
{ {
if( !p_input ) return; if( !p_input ) return;
if( p_input && !( p_input->b_dead || !vlc_object_alive( p_input ) ) )
{ PLItem *item = findByInput( rootItem, input_GetItem( p_input )->i_id );
PLItem *item = findByInput( rootItem, input_GetItem( p_input )->i_id ); if( item ) emit currentIndexChanged( index( item, 0 ) );
if( item ) emit currentIndexChanged( index( item, 0 ) );
}
processInputItemUpdate( input_GetItem( p_input ) ); processInputItemUpdate( input_GetItem( p_input ) );
} }
......
...@@ -102,7 +102,7 @@ void InputManager::setInput( input_thread_t *_p_input ) ...@@ -102,7 +102,7 @@ void InputManager::setInput( input_thread_t *_p_input )
{ {
delInput(); delInput();
p_input = _p_input; p_input = _p_input;
if( p_input && !( p_input->b_dead || !vlc_object_alive (p_input) ) ) if( p_input != NULL )
{ {
msg_Dbg( p_intf, "IM: Setting an input" ); msg_Dbg( p_intf, "IM: Setting an input" );
vlc_object_hold( p_input ); vlc_object_hold( p_input );
...@@ -119,7 +119,6 @@ void InputManager::setInput( input_thread_t *_p_input ) ...@@ -119,7 +119,6 @@ void InputManager::setInput( input_thread_t *_p_input )
} }
else else
{ {
p_input = NULL;
p_item = NULL; p_item = NULL;
assert( !p_input_vbi ); assert( !p_input_vbi );
emit rateChanged( var_InheritFloat( p_intf, "rate" ) ); emit rateChanged( var_InheritFloat( p_intf, "rate" ) );
......
...@@ -133,8 +133,7 @@ public: ...@@ -133,8 +133,7 @@ public:
{ {
return p_input /* We have an input */ return p_input /* We have an input */
&& !p_input->b_dead /* not dead yet, */ && !p_input->b_dead /* not dead yet, */
&& !p_input->b_eof /* not EOF either, */ && !p_input->b_eof /* not EOF either */;
&& vlc_object_alive (p_input); /* and the VLC object is alive */
} }
int playingStatus(); int playingStatus();
......
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