h264: Reset last_pocs in case of reference or frame number inconsistencies

This prevents faulty increasing of has_b_frames
Should fix Ticket 2062

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c230af9bccc3cadb373f9007ba14fffb6c2acc75)
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit 1c1076385f01619f0d0933f9f4fb8f5d1e80435b)

Conflicts:
	mythtv/external/FFmpeg/libavcodec/h264_refs.c
Improved cropping of the bottom 8 lines of 1088-line video.

Refs #11358.  Reverts 9d9de7b75d5354c9130526311a0c74d7172ebe6d and
cleans up the bottom 8 lines by applying a crop filter to the source.
This is tested for the XVideo output method.

The VDPAU output method does not use the standard filter mechanism,
but it works fine on 1088-line video until the h.264 parser thinks the
resolution has changed from 1080 to 1088 lines.  To compensate, we
don't acknowledge a resolution change when this happens.
(cherry picked from commit c0bc92822fe63221ad8fc5cf52a6e661b37b6f21)

Note: the hard-coding of 1088->1080 is not the best way to handle
this.  It will be cleaned up in Master.
Make the string "Record at any time on any channel" translatable in 0.26-fixes.
Update the Danish translation of mythfrontend.
Make sure forked process has stopped when deleting MythSystem

This forces a termination in a forked MythSystem process when the
MythSystem object is destroyed, preventing a situation where the private
internal object tries to access resources from the no-longer-existent
parent object.

Fixes #11412
(cherry picked from commit 9c51ad39a65eee7a3f985a127700fbc8473ffb4e)
Called methods against wrong object in destructor.

Refs #11412
(cherry picked from commit e1f14a5380886c6ddf95379341aa0f56481b7587)
Have mythtranscode report aac_latm
Fix h.264 frame/keyframe identification in the player.

If a NAL unit that determines a frame start appears as the last NAL
unit in the packet, then the frame start is not identified until the
start of the next packet.  If this new packet has its own NAL unit
that determines a frame start, and that NAL unit is not at the end of
the packet, then only one frame start would be counted rather than
two.  This is fixed by returning the total number of frame starts,
rather than a bool.

In theory, the same problem could exist in the recorder, but it
appears that the packets in the original recording may have some
trailing NAL units that are stripped by the ffmpeg libraries when
assembling the packet for the player, causing the situation not to
occur.
(cherry picked from commit 86c22ed3d5c522bcecb88ecacd58104fc0dd6d8d)
Bump binary version after cherry picking 86c22ed3d5c522bcecb88ecacd58104fc0dd6d8d
MythArchive: update the encoding profiles to work with the current mythffmpeg

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@squashedfrog.net>

(cherry picked from 5a0e83a20e8f75612b86fb56039b7803a11afd1b)
MythArchive: update mythburn.py to work with the updated encoding profiles

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@squashedfrog.net>

(cherry picked from a784b93f1d1c6edbc0b47ac578def5d3275171a8)
MythArchive: update mythburn.py to work with the new mpeg2video codec name

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@squashedfrog.net>

(cherry picked from 13c3035d1fed13a37c42d872b1f8dafb2e6f556f)
Make comparisons consistent

Refs #11299
Add AAC and AAC_LATM tages to mythtranscode info output

Pull request: https://github.com/MythTV/mythtv/pull/33
Merge remote-tracking branch 'glidos/fixes/0.26' into fixes/0.26

Refs #11380 and e78e59c6b2d71631e18027b9b9c84212744472bf

Signed-off-by: Stuart Auchterlonie <stuarta@squashedfrog.net>
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: Stuart Auchterlonie <stuarta@squashedfrog.net>
(cherry-picked from 0026dda883ef50ab7f2fda7f2d2218bc56f094a7)
Merge branch 'fixes/0.26' of https://github.com/MythTV/mythtv into fixes/0.26
SignalMonitor: Timeout if we don't get a lock in a reasonable amount of time.
(cherry picked from commit 6bae400b0bbeb539e6e9390517e1a90f8f6f13d4)
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)

Conflicts:
	mythtv/libs/libmythtv/dtvrecorder.cpp
	mythtv/libs/libmythtv/recorders/iptvrecorder.cpp
	mythtv/libs/libmythtv/recorders/iptvrecorder.h
Cleanup some useless "discontinuity detected" messages following 87a15e1ce

Closes #11328
(cherry picked from commit efc1e46a8a2d913a8070483178ca46293f0a4423)
Merge branch 'fixes/0.26' of https://github.com/MythTV/mythtv into fixes/0.26