Fix .empty() being called when .clear() was meant in cddb.cpp. Spotted by cppcheck
Fix use after free in MediaMonitor::RemoveDevice(), found by cppcheck
Don't setup to decode every video stream found, just the first.

Fixes playback of certain video files containing multiple video streams.
Properly initialize the MythPlayer::video_aspect field.

The MythPlayer constructor unconditionally initializes video_aspect to
4.0/3.0.  In some configurations, pressing EDIT during the "Please
Wait" screen before the start of playback of a non-4:3 recording, will
bring up the cutlist editor locked into 4:3 mode.  Explicitly
initializing video_aspect earlier fixes this.
(cherry picked from commit 192e850ad9a87b7ff457d30cf8308b568cc18299)
Cutlist editor: Trigger a redraw of the editbar when changes are made.

Otherwise, cut/keep marks may incorrectly stay visible when changes to
cut/keep regions are made.
(cherry picked from commit 1241485d5d2ec81deddf2c5ab8deb21b7d796248)
Temporary fix for stuttery playback of AVI files over Storage Group.

This is a reverse of ffmpeg SHA1:8df774be88c347c40f1b2411ed9e391dfec0ebb7
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=8df774be88c347c40f1b2411ed9e391dfec0ebb7

This is not a proper fix. It only reveals an issue with myth Storage Group file ring buffer.
With this ffmpeg change, some AVI files are detected as non-interleaved and the readahead thread starts to pull MB of data which saturates 100Mbit/s link causing the video playback to stutter.
(cherry picked from commit f1540fe05ee15d1f53fe30e137931b185b791821)
Revert "Temporary fix for stuttery playback of AVI files over Storage Group."

This reverts commit c21e9beb16583f640e7457e798c047b3af05cf15.
Revert "Revert "Temporary fix for stuttery playback of AVI files over Storage Group.""

This reverts commit f1cc7e3e4410195aeb6c7da3bba7dc44830bdc4e.
Was never supposed to commit this revert
Speed up and reduce temporary space of time search a lot.

By factoring out the description into a super query the performance can
be greatly improved (e.g. from 2 minutes to 2 seconds)

Thanks to sphery for inspiration by [d9fb21853f] and justinh for testing
and fixing my braino with the column order.

Fixes #10023
(cherry picked from commit c0c47344879d3467cfea62938a33e70278252b36)

Conflicts:

	mythtv/libs/libmyth/programinfo.cpp
Fix copy/paste error in MythUIType::AdjustMinArea(). Coverity 746772
Fix copy/paste error in MythUIType::SetMinArea(). Coverity 746771
URI is RFC3986 and is escape encoded. Must decode it before using it.

Fixes #11307
(cherry picked from commit a99e92c8173fb1887a9b3c116b72edf119fbfd5b)
Fix playback of HLS encrypted streams.

The allows ABC iView on iPad to stream to Myth
(cherry picked from commit c5a4229401b2c224640cda2a31e9339fcd8157de)
Remove incorrect selection of DST offset.

This makes the default offsettzinfo just use the standard timezone
offset from the time module, rather than incorrectly using the existence
of a DST offset as indication that the system is currently in DST.
(cherry picked from commit 4dd0bf8014bf8261c8ed347517ef8197ac7f942e)
Allow posixtzinfo to use the TZ environmental variable.

This adds a check for the TZ environmental variable, and uses that to
define the local timezone if available, rather than always using
/etc/localtime. This resolves an issue on Debian-based systems that
always use the TZ variable, rather than defining the localtime file.
(cherry picked from commit 0bffe0648d7b19ff2b2ca289699982c23a12f455)
Fix typo in tmdb3.py that returns invalid crew IDs.
(cherry picked from commit f4bb17ff2b964c001df376337aa29323615cf790)
Fix an issue with keyframe positions produced by mythcommflag --rebuild.

The seeking code in DecoderBase assumes there is a keyframe at frame
0, otherwise it shifts all keyframe numbers by the value of the first
keyframe number in the map.  This causes problems for recordings with
variable keyframe distances.  To correct this, make sure mythcommflag
--rebuild creates an explicit entry for frame 0.

Note: this does not fix the issue of mythcommflag --rebuild adding
bogus keyframes to the seektable for h.264 recordings.

Cherry-picked from a small part of
49dbed5be0729b04a5f0fd0426a32fceb2dd7935 .
Bump MDM::downloadNow() timeout up to 60 seconds.

The previous 10-second timeout was causing issues when trying to
download large lineups from Schedules Direct. This commit bumps
the downloadNow() timeout to 60 seconds.  This is a blocking call,
so if the caller doesn't want to potentially block for that long,
they should be use one of the non-blocking methods.

References #11287.

(cherry picked from commit afa03f27a2fb442800f148fb28da1f7585a2f02f)
Configure the h.264 parser to identify only IDR keyframes.

This makes keyframes identified by "mythcommflag --rebuild" and
mythtranscode much closer to reality, though there are still
discrepancies compared to the recorder and raw ffmpeg.
(cherry picked from commit 590f161b1d5ff8c7e08b0beae480ece7a185d3ab)
mythccextractor: Fix teletext subtitle duration

Previously ProcessTeletext() didn't leave one subtitle behind.  This caused the
length calculation in IngestSubtitle() to never be performed, which meant that
the length was always set to the default value 750 ms.

Fixes #11081.
(cherry picked from commit 08ad6cef707456e959b48d5e48c09929e023fc49)
(cherry picked from commit 018691f04687321f90ef2938455824065bcf674e)