The module used FIND_ANYWHERE. The proposed patch solved the bug as a side-effect as you get the latest created input, which is the current one with the proposed patch (wait for init to signal thread as ready)
p_sys = malloc( sizeof( sout_stream_sys_t ) );
p_sys->p_input = vlc_object_find( p_stream, VLC_OBJECT_INPUT,
p_sys = malloc( sizeof( sout_stream_sys_t ) );
p_sys->p_input = vlc_object_find( p_stream, VLC_OBJECT_INPUT,
if( !p_sys->p_input )
{
msg_Err( p_stream, "cannot find p_input" );
if( !p_sys->p_input )
{
msg_Err( p_stream, "cannot find p_input" );