mpegts: K&R formatting cosmetics
mpegts: Drop some unnecessary parentheses
mpegts: Avoid unnecessary variable shadowing
mpegts: Fix memory leaks and related crashes in mpegs_write_header()