patch TS files on the fly by adding stuffing packets and removing discontinuity flags