Most of the gas that passes from the intestines doesn't smell at all.
Any bad smell is caused by hydrogen sulfide, better known as "rotten egg" gas (YUCK).
Some dogs swallow large amounts of air while eating.
The foul smelling flatulence is usually due to poor digestion of certain nutrients, such as protein or fiber.