If the release of gas stops at certain times between prayers, you should wait for that time, perform ablution, and pray. However, if it is continuous, you should perform ablution after the prayer time begins and pray, and the release of gas during the prayer is excused. And Allah The Almighty Knows Best.