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

gui: remove useless checks for input_thread_t.b_dead and b_eof

The input thread sends events. There is no point in checking manually
since the input thread functions aresafe to "use" so long as the caller
has a reference to the input thread (regardless of the input thread
being dead or at EOF). Also the value of those flags can change
asynchronously (outside the input thread) so the checks were racy.
parent bfd85b07
......@@ -1064,7 +1064,7 @@ static int DrawStatus(intf_thread_t *intf, input_thread_t *p_input)
random = var_GetBool(p_playlist, "random") ? _("[Random] ") : "";
loop = var_GetBool(p_playlist, "loop") ? _("[Loop]") : "";
if (p_input && !p_input->b_dead) {
if (p_input) {
vlc_value_t val;
char *path, *uri;
......
......@@ -130,12 +130,7 @@ public:
virtual ~InputManager();
void delInput();
bool hasInput()
{
return p_input /* We have an input */
&& !p_input->b_dead /* not dead yet, */
&& !p_input->b_eof /* not EOF either */;
}
bool hasInput() const { return p_input != NULL; }
int playingStatus();
bool hasAudio();
......
......@@ -170,10 +170,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
if( !p_input )
return VLC_SUCCESS;
if( p_input->b_dead )
/* Not playing anything ... */
return VLC_SUCCESS;
/* Playing something ... */
input_item_t *p_input_item = input_GetItem( p_input );
psz_title = input_item_GetTitleFbName( p_input_item );
......
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