Rework RecorderBase::AspectChange() so it can't cause divide by zero.

Conflicts:

	mythtv/libs/libmythtv/recorderbase.cpp
Add missing break statement in PlaybackBox::ShowAvailabilityPopup(). Caught by Coverity.
Fix assumption that ints would be initialised to zero in JobQueueEntry, this isn't the case with C++. It appears that this would have caused any job that didn't include a chanid to abort even though the code indicates that it's perfectly valid to have a job which doesn't operate on a recording and wouldn't require the chanid. I don't know enough about the intended behaviour to say whether this will fix a user-visible bug ... Discovered by Coverity.
Fix assignment where comparison was intended in FreeSurround::getLatency(). Caught by Coverity
Fix a bunch of memory leaks in mythmetadatalookup. Coverity.
Fix CID 700722: Allocation too small for string (Coverity) in AudioOutputPulseAudio::ChooseHost()
Remove the "Seek to exact frame" setting.

Instead, use more adaptive, sensible behavior.  When doing relative
seeks, snap to the nearest keyframe if its distance from the target
frame is within 10% of the total seek distance.  When seeking within
the cutlist editor, use a value of 50% instead.

Exact frame seeking is used for absolute seeks (bookmark seek, skips
based on cutlist/commskiplist, preview generation), and for keyframe
and single-frame seeking in the cutlist editor.
Fix potential double-free (found by Coverity)
Fix seeking in HLS playback..

Can finally seek properly ; and pretty accurate and fast at that !
Seeking in Live stream is enabled. This can have some adverse effects if attempting to seek to fast toward the end and a EOF may be detected. However, this allows starting the HLS stream generated by myth and seek into it properly.
Bookmarks work.

Also improve retry when the download of a segments failed. After 3 attempts, the segments is simply dropped. I figured this is better than dropping to a lower quality stream because 1-it may not be any better on the other stream, and 2-FFmpeg H264 decoder will crash if there's a change of resolution
Use the correct delete for the array pulse_host. Reported by Coverity.
Fix memory leak in AudioOutputPulseAudio(). The code in question seems to serve no purpose but on the offchance that I'm wrong I've kept in place and just ensured that we cleanup after it.
Fix PIP video frames being initialised with the size of the pointer instead of the actual frame size due to a sizeof() error. Spotted by Coverity
Add a playback OSD menu option to cancel an in-progress playlist.

Previously, the only way to stop playlist playback was to execute a
jump point, as EXIT simply moves to the next playlist item.  Now, the
playback OSD menu, "Playback" submenu, has a "Cancel Playlist" entry,
with the effect that when playback ends, it returns to the Watch
Recordings screen instead of the next playlist entry.
Silence cppcheck warning.

This was a false positive, m_maxspeakers was initialised in AudioSetupWizard::Init.
Silence cppcheck warning
Fix some cppcheck warnings.
Remove and ignore streams containing no segments.

Some streams (France 24) ; have one stream that contains no segment whatsoever in one of the backup stream. So remove it after parsing it.
Unfortunately, that particular stream marks the over playback as VOD. Ideally we should ignore all tags from a stream that is going to be deleted. TODO
Following 6655d240572569284cdc34f804b7dd39838a2051. Can actually completely remove it
Fix initialisation of arrays in MethodInfo::Invoke(). Identified by Cppcheck
Fix playback of some streams using unusually long segment.

Al Jazeera live stream use 18s segment, it could cause the startup buffer to be exhausted before we start looking for new one. Allowing seek on live stream to allow seeking on non-completed myth transcode has added a quite severe delay as FFmpeg first tries to estimate the length of the stream by looking into the last segment. This means that for playback to start, we must retrieve the first two segments, followed by the last two.
Need to find a way to 1- make the StreamWorker seek operation lockless and 2-Find a way on how to determine when a stream is really live and one that isn't (like mythtv one).

This fix introduce some kind of regression, you can only seek within the size of the file as determined at startup.