(The problem is that if pts is always 0, no time information will be written, making stream unplayable). * pes: cosmetics.