It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When one of you is in doubt during his prayer whether something has come out of his private part, he should not break off his prayer until he hears a sound or notices a smell."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3375