Until now, any streams in tsmux had to be present when the element
started its first buffer. Now they can appear at any point during the
stream, or even disappear and reappear later using the same PID.
The first output MPEG-TS packet that corresponds to a video input
buffer which had the delta flag cleared (i.e. was a keyframe)
should have the delta flag cleared as well.
This is needed e.g. by tcpserversink in order to keep track
of the last keyframe and be able to burst data to newly-
connected clients.
https://bugzilla.gnome.org/show_bug.cgi?id=706872
A crash occured after pushing buffers and changing mpegtsmux state to
NULL/READ and then back to PLAYING/PAUSED.
The crash was caused by holding a dangling pointer in the MpegTsMux
program table.
Additionally stream headers were leaked when resetting the element:
mux->streamheader set to NULL in mpegtsmux_reset() before it's released
later in the same function.
Added a unit test: test_multiple_state_change
https://bugzilla.gnome.org/show_bug.cgi?id=689107