qtdemux: guard against timestamp calculation overflow in gap event loop