backport 0026dda883ef50ab7f2fda7f2d2218bc56f094a7

fix issue #10222: mythcommflag segfaulting

The problem in issue #10222 is that it is adding the CODEC_FLAG2_FAST flag.
This causes unsafe functions to be used, causing a segfault. The proper way to
fix this would probably be to figure out how to test for the "experimental
speedups" flag, however I don't know the codebase well enough for this.

I tested how this would affect the speed of mythcommflag on one of my recordings.
The results:

Before removing flag:
real 2m13.123s
user 2m16.713s
sys 0m3.502s

After removing flag:
real 2m13.021s
user 2m15.446s
sys 0m3.758s

Signed-off-by: Taylor Ralph <tralph@mythtv.org>
DTVRecorder: buffer up each payload until we know if the payload is a
keyframe.

Especially with H.264, we can be several packets into a payload before we
know if it is a keyframe or just a frame or something else.  Always buffer
the packets of a payload until we know what we are doing with the payload.

If we need to switch ringbuffers, we now do it so the new file will start at
the beginning of the payload holding a keyframe.  Each file will also start
with a PAT/PMT if the "recorder" calls for it.
(cherry picked from commit 87a15e1ce40d81058ff221308d666d73b1517ff2)

Signed-off-by: Taylor Ralph <tralph@mythtv.org>
Cleanup some useless "discontinuity detected" messages following 87a15e1ce

Closes #11328
(cherry picked from commit efc1e46a8a2d913a8070483178ca46293f0a4423)

Signed-off-by: Taylor Ralph <tralph@mythtv.org>