Watch the below video and consider your ruling, along with the reasoning, before opening the analysis.
The team in the red and black is making an attacking play towards the team in yellows goal. As the player takes a shot on goal, his team mate is in an offside position. Although he does not touch the ball, the player is obstructing the goalkeepers line of vision. This is an offside offence and the referee should have ruled the player as offside and awarded a free kick.