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

module_need: give up if pf_activate returns VLC_ETIMEOUT (fixes: #2872)

A plugin can use this if it matched but detected a non-recoverable error
while inside the open callback. Help yourself if you want a "better"
error code.
parent bb5bc9b0
......@@ -580,16 +580,30 @@ found_shortcut:
#endif
p_this->b_force = p_list[i].b_force;
if( p_cand->pf_activate
&& p_cand->pf_activate( p_this ) == VLC_SUCCESS )
int ret = VLC_SUCCESS;
if( p_cand->pf_activate )
ret = p_cand->pf_activate( p_this );
switch( ret )
{
case VLC_SUCCESS:
/* good module! */
p_module = p_cand;
/* Release the remaining modules */
while (++i < count)
module_release (p_list[i].p_module);
}
else
break;
case VLC_ETIMEOUT:
/* good module, but aborted */
module_release( p_cand );
break;
default: /* bad module */
module_release( p_cand );
continue;
}
/* Release the remaining modules */
while (++i < count)
module_release (p_list[i].p_module);
}
free( p_list );
......
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