Poor from the ref tbh, unless he is 100% sure the ball went out of play he should not give it. It looked in play to me and the ref really should not give a corner if he is not sure he has to give the benefit of the doubt to the attacking team there imo.