commit b278c056fc5dd91c3d95040e7eba56a0d2c77596
Author: Richard Shaw <hobbes1069(a)gmail.com>
Date: Tue Nov 1 08:08:40 2022 -0500
Update fixes patch.
v32.0..4cf469cbbf.patch => v32.0..ba52c13223.patch | 1582 +++++++++++++++++++-
1 file changed, 1539 insertions(+), 43 deletions(-)
---
diff --git a/v32.0..4cf469cbbf.patch b/v32.0..ba52c13223.patch
similarity index 96%
rename from v32.0..4cf469cbbf.patch
rename to v32.0..ba52c13223.patch
index 735702b..598c716 100644
--- a/v32.0..4cf469cbbf.patch
+++ b/v32.0..ba52c13223.patch
@@ -1,7 +1,7 @@
From 28d360e98916ae065292fa29675c48faff742923 Mon Sep 17 00:00:00 2001
From: Paul Harrison <paul(a)mythqml.net>
Date: Thu, 24 Feb 2022 11:40:20 +0000
-Subject: [PATCH 01/43] Revert "NuppelVideoRecorder.cpp: convert to QtEndian"
+Subject: [PATCH 01/66] Revert "NuppelVideoRecorder.cpp: convert to QtEndian"
This commit is causing problems with the Ubuntu s390x builds and
possibly other big endian builds.
@@ -165,7 +165,7 @@ index d880ff574bf..81ac26cc4ff 100644
From 56275b303bf7c7fec99993d1fff568708d0b985b Mon Sep 17 00:00:00 2001
From: Anton Khirnov <anton(a)khirnov.net>
Date: Thu, 24 Feb 2022 11:11:28 -0500
-Subject: [PATCH 02/43] configure: link to libatomic when it's present
+Subject: [PATCH 02/66] configure: link to libatomic when it's present
C11 atomics in some configurations (e.g. 64bit operations on ppc64 with
GCC) require linking to libatomic.
@@ -234,7 +234,7 @@ index c9fc6dc1ba4..19cae20bab6 100755
From 75cf5040eff2aa6b7dc075462311de7c277b9375 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin(a)martin.st>
Date: Thu, 24 Feb 2022 20:00:00 -0500
-Subject: [PATCH 03/43] configure: arm: Don't add -march= to the compiler if no
+Subject: [PATCH 03/66] configure: arm: Don't add -march= to the compiler if no
preference was passed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -296,7 +296,7 @@ index 19cae20bab6..a270a5a9fcf 100755
From 75b942fd8cdf6979463c72c75e2919e18552c644 Mon Sep 17 00:00:00 2001
From: Peter Bennett <pbennett(a)mythtv.org>
Date: Sat, 26 Feb 2022 11:13:47 -0500
-Subject: [PATCH 04/43] Fix CPU detection for armhf
+Subject: [PATCH 04/66] Fix CPU detection for armhf
This applies the same fix in MythTV as was applied in 75cf504 to FFmpeg.
The same code is in MythTV and needs the same fix.
@@ -329,7 +329,7 @@ index d7349a91cd4..fda2057a282 100755
From 44a45272517a8122369d74f149dc86432afe3ac0 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Mon, 28 Feb 2022 21:23:06 +0100
-Subject: [PATCH 05/43] Remove extraneous ? character in Sat>IP OPTIONS message
+Subject: [PATCH 05/66] Remove extraneous ? character in Sat>IP OPTIONS message
The extraneous ? character occurs when the QUrl query is initialized to an empty string
"".
Fixed by replacing the "" by a QString() in the OPTIONS and the PLAY query
composition.
@@ -369,7 +369,7 @@ index 502b49f8d12..531eb64b009 100644
From e78a0c0042ea20240adef7566676ddeec4c2fb88 Mon Sep 17 00:00:00 2001
From: David Engel <dengel(a)mythtv.org>
Date: Fri, 4 Mar 2022 10:44:01 -0600
-Subject: [PATCH 06/43] Fix playback hangs at end of file.
+Subject: [PATCH 06/66] Fix playback hangs at end of file.
Refs #511
@@ -403,7 +403,7 @@ index 8f7ac450c67..6a9f0738ebd 100644
From 043507cd6f638af4033ae7faca00dec4edc8deb2 Mon Sep 17 00:00:00 2001
From: Scott Theisen <scott.the.elm(a)gmail.com>
Date: Wed, 9 Mar 2022 20:53:30 -0600
-Subject: [PATCH 07/43] Fig logic bug in std::chrono conversion commit
+Subject: [PATCH 07/66] Fig logic bug in std::chrono conversion commit
c71a8672.
Signed-off-by: David Engel <dengel(a)mythtv.org>
@@ -429,7 +429,7 @@ index 6a9f0738ebd..ebd060fd4d5 100644
From ae60e8302fab769dd0aacb091d195b1cef08ad9c Mon Sep 17 00:00:00 2001
From: Scott Theisen <scott.the.elm(a)gmail.com>
Date: Thu, 10 Mar 2022 20:30:13 -0600
-Subject: [PATCH 08/43] Use separate end-of-playback checks for
+Subject: [PATCH 08/66] Use separate end-of-playback checks for
audio-only/mostly content and normal/video-only content.
Refs #511
@@ -479,7 +479,7 @@ index 7041fa996fe..bb50f71d8cc 100644
From 36c5630035864fa5d8efdaec8b0ef6c98067bc67 Mon Sep 17 00:00:00 2001
From: David Hampton <mythtv(a)love2code.net>
Date: Mon, 14 Mar 2022 11:57:26 -0400
-Subject: [PATCH 09/43] Fix MythDate::formatTime to handle times greater than
+Subject: [PATCH 09/66] Fix MythDate::formatTime to handle times greater than
24 hours.
(cherry picked from commit 2d7a09e40f55c13e203994aa4031f7de111fc97f)
@@ -562,7 +562,7 @@ index 17722debbec..e84e536e3ec 100644
From d5fe42fc6b994c716c70901173d876c53200b50c Mon Sep 17 00:00:00 2001
From: David Hampton <mythtv(a)love2code.net>
Date: Tue, 15 Mar 2022 17:41:48 -0400
-Subject: [PATCH 10/43] Better fix for MythDate::formatTime to handle
+Subject: [PATCH 10/66] Better fix for MythDate::formatTime to handle
overflows.
Fixes #520.
@@ -855,7 +855,7 @@ index 85aaaadd14f..9b0e604bb1c 100644
From 9dcf2bb01eba126d304c323503c78ce36bbf595b Mon Sep 17 00:00:00 2001
From: Scott Theisen <scott.the.elm(a)gmail.com>
Date: Wed, 16 Mar 2022 12:42:28 -0400
-Subject: [PATCH 11/43] mythcommflag/CommDetector2.cpp: fix missed
+Subject: [PATCH 11/66] mythcommflag/CommDetector2.cpp: fix missed
MythDate::fortmatTime() uses
hh should be HH; missed chop not replaced.
@@ -900,7 +900,7 @@ index 244e8693602..aef37a8c1cf 100644
From 5432d11672605878a7ab1964996edc7b0103087d Mon Sep 17 00:00:00 2001
From: Scott Theisen <scott.the.elm(a)gmail.com>
Date: Wed, 16 Mar 2022 14:09:35 -0400
-Subject: [PATCH 12/43] MythDate::formatTime(): update doxygen comment
+Subject: [PATCH 12/66] MythDate::formatTime(): update doxygen comment
(cherry picked from commit 259a7fbe911da2ca229a513786172fcefeb8af07)
---
@@ -928,7 +928,7 @@ index 57eaceecd78..65c2b168e63 100644
From f69ce764b78a15989455957eda235d5b1993a08a Mon Sep 17 00:00:00 2001
From: David Hampton <mythtv(a)love2code.net>
Date: Thu, 24 Mar 2022 17:44:32 -0400
-Subject: [PATCH 13/43] Validate AV stream index before accessing stream.
+Subject: [PATCH 13/66] Validate AV stream index before accessing stream.
Fixes #528.
@@ -956,7 +956,7 @@ index 95a0a8d9489..8af5cc853e8 100644
From dcf7e13cce89f363d20a9cdd3922a7741cc214a9 Mon Sep 17 00:00:00 2001
From: John Hoyt <john.hoyt(a)gmail.com>
Date: Sun, 3 Apr 2022 07:35:20 -0400
-Subject: [PATCH 14/43] Add missing include <array> to mythdate
+Subject: [PATCH 14/66] Add missing include <array> to mythdate
---
mythtv/libs/libmythbase/mythdate.cpp | 1 +
@@ -978,7 +978,7 @@ index 65c2b168e63..e7d2a99188a 100644
From 5b54d3bf89a6278c01169287ace4a0fd02cc2233 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Tue, 29 Mar 2022 22:26:45 +0200
-Subject: [PATCH 15/43] Add symbolrate to transport list in mythtv-setup log
+Subject: [PATCH 15/66] Add symbolrate to transport list in mythtv-setup log
The symbolrate is added to the transport list
that is logged by mythtv-setup.
@@ -1014,7 +1014,7 @@ index c7bc185f6d7..303c2c28f4e 100644
From 560b425776dfced77ceb9a83b13f32cf00ff2d94 Mon Sep 17 00:00:00 2001
From: Peter Bennett <pbennett(a)mythtv.org>
Date: Thu, 7 Apr 2022 19:51:20 -0400
-Subject: [PATCH 16/43] Service API V2: Last Play Position APIs
+Subject: [PATCH 16/66] Service API V2: Last Play Position APIs
This adds 4 APIs:
V2Dvr::GetLastPlayPos
@@ -1319,7 +1319,7 @@ index 8e339bef1dd..639236a044a 100644
From 1eacadd5f413197746cb61ea036c522c65f95936 Mon Sep 17 00:00:00 2001
From: acediac <git.zon(a)dfgh.net>
Date: Sat, 9 Apr 2022 22:49:25 +1000
-Subject: [PATCH 17/43] mythfrontend audio fixes for macOS
+Subject: [PATCH 17/66] mythfrontend audio fixes for macOS
- Fixed audio device detection
- Fixed Surround Sound channel capability detection (5.1+ speakers)
@@ -1611,7 +1611,7 @@ index ef5cacc2913..7e18a10a62c 100644
From cd109ec6c08f578e1b0965e4726e6046d75af8e8 Mon Sep 17 00:00:00 2001
From: acediac <git.zon(a)dfgh.net>
Date: Sat, 9 Apr 2022 22:57:38 +1000
-Subject: [PATCH 18/43] Potential memory corruption problems in audiooutputbase
+Subject: [PATCH 18/66] Potential memory corruption problems in audiooutputbase
(cherry picked from commit 81aeb49c456ff4ecab82c2297b22c38bd70d706d)
---
@@ -1662,7 +1662,7 @@ index 69c28f2cc3d..d920d14dd0c 100644
From 9070e9e65b42b19b3a54c21117a07f627418999f Mon Sep 17 00:00:00 2001
From: David Hampton <mythtv(a)love2code.net>
Date: Fri, 8 Apr 2022 13:10:03 -0400
-Subject: [PATCH 19/43] Fix zmserver compilation on rawhide.
+Subject: [PATCH 19/66] Fix zmserver compilation on rawhide.
(cherry picked from commit 9d2c68fdf4512be7aac95310d0bc69d54be63ac3)
---
@@ -1685,7 +1685,7 @@ index 5e13cb48e0b..f6ac052867a 100644
From bbd8355d8dbb5ef78080312c2d632232ea03b504 Mon Sep 17 00:00:00 2001
From: Stuart Auchterlonie <stuarta(a)mythtv.org>
Date: Mon, 11 Apr 2022 22:20:23 +0100
-Subject: [PATCH 20/43] [webapp] fix encoder status when recording
+Subject: [PATCH 20/66] [webapp] fix encoder status when recording
(cherry picked from commit 3da1ca7bc3c72a41cf7a910680cfb8e5ead4b49e)
---
@@ -1759,7 +1759,7 @@ index 554b0193b17..312ccafcf63 100644
From bfae001d5cbb6e6012c3971e605d961e639e1eb7 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Sun, 3 Apr 2022 18:39:20 +0200
-Subject: [PATCH 21/43] Determine tuner type in ChannelScanSM constructor
+Subject: [PATCH 21/66] Determine tuner type in ChannelScanSM constructor
Initialize the m_scanDTVTunerType with the tuner type as found
in the card already in the ChannelScanSM constructor.
@@ -1796,7 +1796,7 @@ index d7de02b7fd9..12411eb9196 100644
From ec4558f3e1bbc021d771276a288039924f181a8b Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Wed, 20 Apr 2022 21:39:32 +0200
-Subject: [PATCH 22/43] Update preview picture after record playback exit
+Subject: [PATCH 22/66] Update preview picture after record playback exit
When exiting a record playback, the preview thumbnail picture that is shown
at the right/bottom corner of the MythCenter-wide theme, is updated to show
@@ -1876,7 +1876,7 @@ index 653b37c344b..40f5cda7e75 100644
From daa4e7e4474c019714d21674ee7e18f3bc89624d Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Fri, 22 Apr 2022 21:04:59 +0200
-Subject: [PATCH 23/43] Animation update interval lower bound
+Subject: [PATCH 23/66] Animation update interval lower bound
Add a lower bound of 10ms for the animation update interval.
The animation is used in the MythBuntu theme and there it can cause a stall of
@@ -1912,7 +1912,7 @@ index bfdc30710ff..69f9da7e655 100644
From 130f7054da73f8a23d04aacf683d743a449a4ec5 Mon Sep 17 00:00:00 2001
From: David Engel <dengel(a)mythtv.org>
Date: Tue, 26 Apr 2022 16:03:25 -0500
-Subject: [PATCH 24/43] Fix wakeup calculations in HLS.
+Subject: [PATCH 24/66] Fix wakeup calculations in HLS.
The std::chrono changes in commit 41225f80 inadvertently contained
bugs that caused the wakeup times to be too low, often 0 (aka no
@@ -1989,7 +1989,7 @@ index 2294f107a8a..22d1f377b72 100644
From 839d0f9ab6c7ced958bb5372376ab862461ae6d8 Mon Sep 17 00:00:00 2001
From: David Engel <dengel(a)mythtv.org>
Date: Tue, 26 Apr 2022 17:12:08 -0500
-Subject: [PATCH 25/43] Add cast needed by some compilers to last previous
+Subject: [PATCH 25/66] Add cast needed by some compilers to last previous
commit.
(cherry picked from commit e2877111bec395c6baa0468fc41adbb3526e2d69)
@@ -2015,7 +2015,7 @@ index 22d1f377b72..4db927faac7 100644
From ea669e1f825896355ebc3f428553d887b4d5b4c1 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Wed, 27 Apr 2022 23:42:50 +0200
-Subject: [PATCH 26/43] Jump back in live TV
+Subject: [PATCH 26/66] Jump back in live TV
When jumping back in live TV and the jump time interval is larger than the
current play position then a jump is done to the end of the recording instead
@@ -2045,7 +2045,7 @@ index ebd060fd4d5..b68254f31bd 100644
From d80a8da3f0163e6020ce2b6c76b5b31571fae2df Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Fri, 29 Apr 2022 23:35:08 +0200
-Subject: [PATCH 27/43] Jump forward to next live TV segment
+Subject: [PATCH 27/66] Jump forward to next live TV segment
If playback is at the end of an earlier program in the live TV chain,
skipping forward jumps to the end of the next program
@@ -2077,7 +2077,7 @@ index b68254f31bd..c8c742725c2 100644
From c4fc53c651edbcf695694ee12807b9bc1b4f79ca Mon Sep 17 00:00:00 2001
From: Peter Bennett <pbennett(a)mythtv.org>
Date: Sat, 7 May 2022 17:43:11 -0400
-Subject: [PATCH 28/43] Services V2: Fix content length when length > 2 GB
+Subject: [PATCH 28/66] Services V2: Fix content length when length > 2 GB
Third parameter of std::accumulate determines the return type, so it has
to be explicitly cast to a uint64 to support 64 bit return.
@@ -2106,7 +2106,7 @@ index 5e685632130..c4611197857 100644
From 26079f815a1723021dbe6a13eca0e66018f71e7b Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Fri, 6 May 2022 20:47:05 +0200
-Subject: [PATCH 29/43] Free AVPacket with av_packet_free
+Subject: [PATCH 29/66] Free AVPacket with av_packet_free
Free AVPacket allocated with av_packet_alloc with av_packet_free
instead of with av_packet_unref followed by a delete statement.
@@ -2161,7 +2161,7 @@ index 8af5cc853e8..4e3f9691a1b 100644
From 53c77f01324e5d35dfb08827e16cb0a83b702213 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Thu, 12 May 2022 23:21:08 +0200
-Subject: [PATCH 30/43] EIT start delay
+Subject: [PATCH 30/66] EIT start delay
Compute the second component of the EIT start delay with the highest
input number instead of with the number of inputs.
@@ -2223,7 +2223,7 @@ index f2d1a6eb8f2..7c37a2ed49a 100644
From b6286af7d82f81082f8d07dfcee3f7f8c9ab2542 Mon Sep 17 00:00:00 2001
From: Roland Ernst <rcrernst(a)gmail.com>
Date: Thu, 12 May 2022 21:06:41 +0200
-Subject: [PATCH 31/43] Python Bindings: Add compatibility to MariaDB 10.6
+Subject: [PATCH 31/66] Python Bindings: Add compatibility to MariaDB 10.6
MariaDB 10.6 introduced a new keyword 'offset' which collides with
the field 'offset' from the recordedseek table.
@@ -2357,7 +2357,7 @@ index d02de716032..d33bb70666b 100644
From 98c82d515d53ef57431d6bbfcd4264543a42426b Mon Sep 17 00:00:00 2001
From: David Hampton <mythtv(a)love2code.net>
Date: Thu, 26 May 2022 12:30:10 -0400
-Subject: [PATCH 32/43] Fix problem with GetStatus API call while playing
+Subject: [PATCH 32/66] Fix problem with GetStatus API call while playing
video.
This bug was introduced while fixing a problem where all the network
@@ -2436,7 +2436,7 @@ index a4228de4d3a..b5f937f4f01 100644
From ef9d17307fa1237e35234dd96be55c95c42cde88 Mon Sep 17 00:00:00 2001
From: Korbinian Rosenegger <kroseneg(a)schmidham.net>
Date: Fri, 11 Mar 2022 09:57:52 +0100
-Subject: [PATCH 33/43] Show transcoding profiles menu when job is _not_
+Subject: [PATCH 33/66] Show transcoding profiles menu when job is _not_
running
The transcoding profiles menu needs to be shown when the transcoding job
@@ -2465,7 +2465,7 @@ index abed3de46bb..8e9236b28e8 100644
From 8347647e4208e0963270eddd1724182c61f3d15d Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Tue, 31 May 2022 23:58:59 +0200
-Subject: [PATCH 34/43] Change default Unicable frequency to 1210MHz
+Subject: [PATCH 34/66] Change default Unicable frequency to 1210MHz
The previous default value was 1400MHz which is not a valid Unicable userband frequency.
The new default value of 1210MHz is the frequency of the first userband.
@@ -2501,7 +2501,7 @@ index e3f01619d7e..191daf8c83c 100644
From 7077a824d2e746f305bcb215ea687220abaa17db Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Sat, 4 Jun 2022 21:05:22 +0200
-Subject: [PATCH 35/43] Fix AdaptationFieldSize function
+Subject: [PATCH 35/66] Fix AdaptationFieldSize function
Use the data() function to get a pointer to access the fifth element of
a transport stream packet instead of directly accessing the fifth element of a
@@ -2529,7 +2529,7 @@ index 0a971c436ff..a15ff12c346 100644
From 66573a3f9b95bd6b218e363da2eac76738f990c4 Mon Sep 17 00:00:00 2001
From: David Hampton <mythtv(a)love2code.net>
Date: Wed, 15 Jun 2022 15:54:05 -0400
-Subject: [PATCH 36/43] Fix two logging relay functions to use
+Subject: [PATCH 36/66] Fix two logging relay functions to use
QString::vasprintf.
The code now calls QString::vasprintf, and not QString::asprintf like
@@ -2571,7 +2571,7 @@ index 481a156c667..42aa7ad8330 100644
From a26786f5b4f6890557274ab8435258447db7915c Mon Sep 17 00:00:00 2001
From: David Hampton <mythtv(a)love2code.net>
Date: Thu, 16 Jun 2022 19:42:15 -0400
-Subject: [PATCH 37/43] Fix the std::vector ring_peek/poke functions to use
+Subject: [PATCH 37/66] Fix the std::vector ring_peek/poke functions to use
pass by reference.
Refs #581
@@ -2643,7 +2643,7 @@ index 4c954604b53..beaf29e2bae 100644
From 3bd5ef574c77b92095c5e2089d21473666f95830 Mon Sep 17 00:00:00 2001
From: David Hampton <mythtv(a)love2code.net>
Date: Mon, 20 Jun 2022 00:46:37 -0400
-Subject: [PATCH 38/43] mpeg2fix needs additional setup for FFmpeg 4.3 release.
+Subject: [PATCH 38/66] mpeg2fix needs additional setup for FFmpeg 4.3 release.
Refs: #581 #588
(cherry picked from commit 8f99b9a78611d34b08c3411cb48e910c5cc37b13)
@@ -2669,7 +2669,7 @@ index 42aa7ad8330..cc13738174c 100644
From 7bb5162be039ba2905efea0acf85b076c9be6769 Mon Sep 17 00:00:00 2001
From: Stuart Auchterlonie <stuarta(a)mythtv.org>
Date: Wed, 22 Jun 2022 08:27:28 +0100
-Subject: [PATCH 39/43] extra include required on freebsd 13.1
+Subject: [PATCH 39/66] extra include required on freebsd 13.1
(cherry picked from commit e60b4b35a19214e541ee3647e0d07007997367c1)
---
@@ -2693,7 +2693,7 @@ index 38e6100bb8c..695425e8134 100644
From 501f85b389d8b626cbe4325fff1c18d84fbe25c9 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Fri, 24 Jun 2022 22:46:46 +0200
-Subject: [PATCH 40/43] Revert "Trim whitespace from beginning and end of
+Subject: [PATCH 40/66] Revert "Trim whitespace from beginning and end of
lyrics lines."
This reverts commit dee0dabda1c5b2c95b17f2365f8c68e8b66e3734.
@@ -2745,7 +2745,7 @@ index 9e371e6ad40..dccd0407468 100644
From b09ce5de48c1eabc433615011016cee4e50cfce8 Mon Sep 17 00:00:00 2001
From: Timothy D Witham <twitham(a)sbcglobal.net>
Date: Sat, 25 Jun 2022 01:17:14 -0500
-Subject: [PATCH 41/43] Fix #579 LCD time by replacing colon with space.
+Subject: [PATCH 41/66] Fix #579 LCD time by replacing colon with space.
(cherry picked from commit 5c2f8090e3a1051f2459d28060eaf531177d57f8)
---
@@ -2769,7 +2769,7 @@ index 71881f22b10..be249bed9d3 100644
From 811dad0e91b223bcd3e6f17950e81d296d93fc65 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Thu, 23 Jun 2022 22:13:09 +0200
-Subject: [PATCH 42/43] Discard transport stream packets with invalid
+Subject: [PATCH 42/66] Discard transport stream packets with invalid
adaptation field length
See ISO/IEC 13818-1 : 2000 (E). 2.4.3.5 Semantic definition of fields in adaptation
field
@@ -2818,7 +2818,7 @@ index b06ec00d9a2..c1ce2f102be 100644
From 4cf469cbbf02eb9343de4b776d3fee6d19b6af5d Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Fri, 24 Jun 2022 21:33:46 +0200
-Subject: [PATCH 43/43] Remove superfluous VERBOSE_LEVEL_CHECK macro in
+Subject: [PATCH 43/66] Remove superfluous VERBOSE_LEVEL_CHECK macro in
adaptation field size check
This check is not needed because LOG is a macro that starts with the VERBOSE_LEVEL_CHECK
@@ -2849,3 +2849,1499 @@ index c1ce2f102be..09b9599d20a 100644
return false;
}
}
+
+From 66ba83839a20e7c9adf0347ab6963dcdf1a58e6e Mon Sep 17 00:00:00 2001
+From: Scott Theisen <scott.the.elm(a)gmail.com>
+Date: Fri, 24 Jun 2022 17:07:00 -0400
+Subject: [PATCH 44/66] MythEDID: fix out of bounds memory access
+
+found by valgrind while investigating segmentation faults that
+occured randomly on startup of mythfrontend.
+
+There are only 4 descriptors in the EDID data structure.
+By incorrectly looping 5 times in MythEDID::ParseBaseBlock(),
+an offset of 126 is passed to ParseDisplayDescriptor() or
+ParseDetailedTimingDescriptor() which will then read past
+the end of the 128 byte EDID data structure.
+
+This appears to have always been wrong since it was added in
+53d170221983764ae108939cbdb0bcbfc48b6114 .
+
+(cherry picked from commit 8e36123478cb98f0134bdc4447beb51d8e708385)
+---
+ mythtv/libs/libmythui/mythedid.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mythtv/libs/libmythui/mythedid.cpp b/mythtv/libs/libmythui/mythedid.cpp
+index 9940c24992b..704fbd09b7f 100644
+--- a/mythtv/libs/libmythui/mythedid.cpp
++++ b/mythtv/libs/libmythui/mythedid.cpp
+@@ -274,7 +274,7 @@ bool MythEDID::ParseBaseBlock(const quint8* Data)
+ qFuzzyCompare(m_gamma + 1.0F, 2.20F + 1.0F);
+
+ // Parse blocks
+- for (uint i = 0; i < 5; ++i)
++ for (uint i = 0; i < 4; ++i)
+ {
+ uint offset = DATA_BLOCK_OFFSET + i * 18;
+ if (Data[offset] == 0 || Data[offset + 1] == 0 || Data[offset + 2] == 0)
+
+From 2514e9eb4d53d4c0690ebc80f9c4b88405835129 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Sun, 26 Jun 2022 20:41:00 +0200
+Subject: [PATCH 45/66] Remove quotes in filelyrics.py argument values
+
+The string quotes around each argument value in the command to start filelyrics.py causes
a failure in reading the .lrc file.
+This is a regression; behavior of fixes/31 is correct but fixes/32 and master is broken.
+These quotes have been added as part of commit b50234ef0229f1c08d32149fcb7937b15b75a603.
+
+Refs #590
+
+(cherry picked from commit 2ecdd5d6d6055d1beea55c227d2b92883a775600)
+---
+ mythtv/programs/mythutil/musicmetautils.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/mythtv/programs/mythutil/musicmetautils.cpp
b/mythtv/programs/mythutil/musicmetautils.cpp
+index cf42f396357..21126b9b60e 100644
+--- a/mythtv/programs/mythutil/musicmetautils.cpp
++++ b/mythtv/programs/mythutil/musicmetautils.cpp
+@@ -545,10 +545,10 @@ static int FindLyrics(const MythUtilCommandLineParser
&cmdline)
+
+ QProcess p;
+ QStringList args { grabber.m_filename,
+- QString(R"(--artist="%1")").arg(artist),
+- QString(R"(--album="%1")").arg(album),
+- QString(R"(--title="%1")").arg(title),
+-
QString(R"(--filename="%1")").arg(filename) };
++ QString("--artist=%1").arg(artist),
++ QString("--album=%1").arg(album),
++ QString("--title=%1").arg(title),
++ QString("--filename=%1").arg(filename) };
+ p.start(PYTHON_EXE, args);
+ p.waitForFinished(-1);
+ QString result = p.readAllStandardOutput();
+
+From ced41a5f8f5a53c685755cde67fbe16206c9aa55 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Thu, 30 Jun 2022 22:26:16 +0200
+Subject: [PATCH 46/66] Option to exit playback and clear last played position
+
+Add the "Clear last played position and exit" choice to the "Action on
playback exit"
+configuration in mythfrontend/Setup/Video/Playback/General Playback.
+Add the "Exit Without Saving" option to the playback exit menu. This menu is
shown when in the
+"Action on playback exit" configuration in
mythfrontend/Setup/Video/Playback/General Playback
+an option for a prompt on playback exit is selected.
+In fixes/31 the bookmark representing the last_played_position is only updated
+on playback exit when so configured.
+In fixes/32 the last_played_position is continuously updated so there is no easy way to
do
+a real "Exit Without Saving" because the last_played_position has been saved
already.
+Instead, the "Exit Without Saving" and "Clear last played position and
exit" actions
+are implemented by clearing the last played position on playback exit.
+This insures that the next playback starts at the beginning of the recording or
+at the bookmark, when there is a bookmark present.
+This is the same as the behavior of fixes/31 when so configured.
+
+Refs #543
+
+(cherry picked from commit c46e186c3b48c07e87331ece16e0858d2d9d4470)
+---
+ mythtv/libs/libmythtv/tv_play.cpp | 20 ++++++++++++++++++-
+ mythtv/libs/libmythtv/tv_play.h | 3 ++-
+ .../programs/mythfrontend/globalsettings.cpp | 1 +
+ 3 files changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
+index 2803837fb23..61a10db4ff6 100644
+--- a/mythtv/libs/libmythtv/tv_play.cpp
++++ b/mythtv/libs/libmythtv/tv_play.cpp
+@@ -2717,13 +2717,19 @@ void TV::PrepToSwitchToRecordedProgram(const ProgramInfo
&ProgInfo)
+ void TV::PrepareToExitPlayer(int Line)
+ {
+ m_playerContext.LockDeletePlayer(__FILE__, Line);
+- if (m_savePosOnExit && m_player && m_playerContext.m_playingInfo)
++ if ((m_savePosOnExit || m_clearPosOnExit) && m_player &&
m_playerContext.m_playingInfo)
+ {
+ // Clear last play position when we're at the end of a recording.
+ // unless the recording is in-progress.
+ bool at_end = !StateIsRecording(m_playerContext.GetState()) &&
+ (GetEndOfRecording() || m_playerContext.m_player->IsNearEnd());
+
++ // Clear last play position on exit when the user requested this
++ if (m_clearPosOnExit)
++ {
++ at_end = true;
++ }
++
+ // Clear/Save play position without notification
+ // The change must be broadcast when file is no longer in use
+ // to update previews, ie. with the MarkNotInUse notification
+@@ -3899,6 +3905,10 @@ bool TV::ActiveHandleAction(const QStringList &Actions,
+ ShowOSDStopWatchingRecording();
+ return handled;
+ }
++ if (2 & m_dbPlaybackExitPrompt)
++ {
++ m_clearPosOnExit = true;
++ }
+ PrepareToExitPlayer(__LINE__);
+ m_requestDelete = false;
+ exit = true;
+@@ -9811,6 +9821,8 @@ void TV::ShowOSDStopWatchingRecording()
+
+ dialog.m_buttons.push_back({tr("Exit %1").arg(videotype), ACTION_STOP});
+
++ dialog.m_buttons.push_back({tr("Exit Without Saving"),
"DIALOG_VIDEOEXIT_CLEARLASTPLAYEDPOSITION_0"});
++
+ if (IsDeleteAllowed())
+ dialog.m_buttons.push_back({tr("Delete this recording"),
"DIALOG_VIDEOEXIT_CONFIRMDELETE_0"});
+
+@@ -9958,6 +9970,12 @@ bool TV::HandleOSDVideoExit(const QString& Action)
+ {
+ DoTogglePause(true);
+ }
++ else if (Action == "CLEARLASTPLAYEDPOSITION")
++ {
++ m_clearPosOnExit = true;
++ PrepareToExitPlayer(__LINE__);
++ SetExitPlayer(true, true);
++ }
+
+ return hide;
+ }
+diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
+index 6bc0acc587c..015e9f995f3 100644
+--- a/mythtv/libs/libmythtv/tv_play.h
++++ b/mythtv/libs/libmythtv/tv_play.h
+@@ -528,7 +528,7 @@ class MTV_PUBLIC TV : public TVPlaybackState, public
MythTVMenuItemDisplayer, pu
+ uint m_vbimode {VBIMode::None};
+ uint m_switchToInputId {0};
+
+- /// True if the user told MythTV to stop plaback. If this is false
++ /// True if the user told MythTV to stop playback. If this is false
+ /// when we exit the player, we display an error screen.
+ mutable bool m_wantsToQuit {true};
+ bool m_stretchAdjustment {false}; ///< True if time stretch is
turned on
+@@ -543,6 +543,7 @@ class MTV_PUBLIC TV : public TVPlaybackState, public
MythTVMenuItemDisplayer, pu
+ bool m_doSmartForward {false};
+ bool m_queuedTranscode {false};
+ bool m_savePosOnExit {false}; ///< False until first timer event
++ bool m_clearPosOnExit {false}; ///< False unless requested by user
on playback exit
+ /// Picture attribute type to modify.
+ PictureAdjustType m_adjustingPicture {kAdjustingPicture_None};
+ /// Picture attribute to modify (on arrow left or right)
+diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp
b/mythtv/programs/mythfrontend/globalsettings.cpp
+index e2fcc817adb..e92eee290ed 100644
+--- a/mythtv/programs/mythfrontend/globalsettings.cpp
++++ b/mythtv/programs/mythfrontend/globalsettings.cpp
+@@ -1763,6 +1763,7 @@ static HostComboBoxSetting *PlaybackExitPrompt()
+ gc->setLabel(PlaybackSettings::tr("Action on playback exit"));
+
+ gc->addSelection(PlaybackSettings::tr("Just exit"), "0");
++ gc->addSelection(PlaybackSettings::tr("Clear last played position and
exit"), "2");
+ gc->addSelection(PlaybackSettings::tr("Always prompt (excluding Live
TV)"),
+ "1");
+ gc->addSelection(PlaybackSettings::tr("Always prompt (including Live
TV)"),
+
+From 6b2d23d4de0fe9034c81cbc5893f8febf38594a0 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Sun, 10 Jul 2022 08:18:52 +0200
+Subject: [PATCH 47/66] Revert "Option to exit playback and clear last played
+ position"
+
+This reverts commit ced41a5f8f5a53c685755cde67fbe16206c9aa55.
+
+Reason is reported regression in handling the last played position.
+---
+ mythtv/libs/libmythtv/tv_play.cpp | 20 +------------------
+ mythtv/libs/libmythtv/tv_play.h | 3 +--
+ .../programs/mythfrontend/globalsettings.cpp | 1 -
+ 3 files changed, 2 insertions(+), 22 deletions(-)
+
+diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
+index 61a10db4ff6..2803837fb23 100644
+--- a/mythtv/libs/libmythtv/tv_play.cpp
++++ b/mythtv/libs/libmythtv/tv_play.cpp
+@@ -2717,19 +2717,13 @@ void TV::PrepToSwitchToRecordedProgram(const ProgramInfo
&ProgInfo)
+ void TV::PrepareToExitPlayer(int Line)
+ {
+ m_playerContext.LockDeletePlayer(__FILE__, Line);
+- if ((m_savePosOnExit || m_clearPosOnExit) && m_player &&
m_playerContext.m_playingInfo)
++ if (m_savePosOnExit && m_player && m_playerContext.m_playingInfo)
+ {
+ // Clear last play position when we're at the end of a recording.
+ // unless the recording is in-progress.
+ bool at_end = !StateIsRecording(m_playerContext.GetState()) &&
+ (GetEndOfRecording() || m_playerContext.m_player->IsNearEnd());
+
+- // Clear last play position on exit when the user requested this
+- if (m_clearPosOnExit)
+- {
+- at_end = true;
+- }
+-
+ // Clear/Save play position without notification
+ // The change must be broadcast when file is no longer in use
+ // to update previews, ie. with the MarkNotInUse notification
+@@ -3905,10 +3899,6 @@ bool TV::ActiveHandleAction(const QStringList &Actions,
+ ShowOSDStopWatchingRecording();
+ return handled;
+ }
+- if (2 & m_dbPlaybackExitPrompt)
+- {
+- m_clearPosOnExit = true;
+- }
+ PrepareToExitPlayer(__LINE__);
+ m_requestDelete = false;
+ exit = true;
+@@ -9821,8 +9811,6 @@ void TV::ShowOSDStopWatchingRecording()
+
+ dialog.m_buttons.push_back({tr("Exit %1").arg(videotype), ACTION_STOP});
+
+- dialog.m_buttons.push_back({tr("Exit Without Saving"),
"DIALOG_VIDEOEXIT_CLEARLASTPLAYEDPOSITION_0"});
+-
+ if (IsDeleteAllowed())
+ dialog.m_buttons.push_back({tr("Delete this recording"),
"DIALOG_VIDEOEXIT_CONFIRMDELETE_0"});
+
+@@ -9970,12 +9958,6 @@ bool TV::HandleOSDVideoExit(const QString& Action)
+ {
+ DoTogglePause(true);
+ }
+- else if (Action == "CLEARLASTPLAYEDPOSITION")
+- {
+- m_clearPosOnExit = true;
+- PrepareToExitPlayer(__LINE__);
+- SetExitPlayer(true, true);
+- }
+
+ return hide;
+ }
+diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
+index 015e9f995f3..6bc0acc587c 100644
+--- a/mythtv/libs/libmythtv/tv_play.h
++++ b/mythtv/libs/libmythtv/tv_play.h
+@@ -528,7 +528,7 @@ class MTV_PUBLIC TV : public TVPlaybackState, public
MythTVMenuItemDisplayer, pu
+ uint m_vbimode {VBIMode::None};
+ uint m_switchToInputId {0};
+
+- /// True if the user told MythTV to stop playback. If this is false
++ /// True if the user told MythTV to stop plaback. If this is false
+ /// when we exit the player, we display an error screen.
+ mutable bool m_wantsToQuit {true};
+ bool m_stretchAdjustment {false}; ///< True if time stretch is
turned on
+@@ -543,7 +543,6 @@ class MTV_PUBLIC TV : public TVPlaybackState, public
MythTVMenuItemDisplayer, pu
+ bool m_doSmartForward {false};
+ bool m_queuedTranscode {false};
+ bool m_savePosOnExit {false}; ///< False until first timer event
+- bool m_clearPosOnExit {false}; ///< False unless requested by user
on playback exit
+ /// Picture attribute type to modify.
+ PictureAdjustType m_adjustingPicture {kAdjustingPicture_None};
+ /// Picture attribute to modify (on arrow left or right)
+diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp
b/mythtv/programs/mythfrontend/globalsettings.cpp
+index e92eee290ed..e2fcc817adb 100644
+--- a/mythtv/programs/mythfrontend/globalsettings.cpp
++++ b/mythtv/programs/mythfrontend/globalsettings.cpp
+@@ -1763,7 +1763,6 @@ static HostComboBoxSetting *PlaybackExitPrompt()
+ gc->setLabel(PlaybackSettings::tr("Action on playback exit"));
+
+ gc->addSelection(PlaybackSettings::tr("Just exit"), "0");
+- gc->addSelection(PlaybackSettings::tr("Clear last played position and
exit"), "2");
+ gc->addSelection(PlaybackSettings::tr("Always prompt (excluding Live
TV)"),
+ "1");
+ gc->addSelection(PlaybackSettings::tr("Always prompt (including Live
TV)"),
+
+From b0db4141b336648b2b89ec0c488e920f0d0b1f48 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Sun, 10 Jul 2022 21:22:58 +0200
+Subject: [PATCH 48/66] Option to exit playback and clear last played position
+
+Add the "Clear last played position and exit" choice to the "Action on
playback exit"
+configuration in mythfrontend/Setup/Video/Playback/General Playback.
+Add the "Exit Without Saving" option to the playback exit menu. This menu is
shown when in the
+"Action on playback exit" configuration in
mythfrontend/Setup/Video/Playback/General Playback
+an option for a prompt on playback exit is selected.
+In fixes/31 the bookmark representing the last_played_position is only updated
+on playback exit when so configured.
+In fixes/32 the last_played_position is continuously updated so there is no easy way to
do
+a real "Exit Without Saving" because the last_played_position has been saved
already.
+Instead, the "Exit Without Saving" and "Clear last played position and
exit" actions
+are implemented by clearing the last played position on playback exit.
+This insures that the next playback starts at the beginning of the recording or
+at the bookmark, when there is a bookmark present.
+This is the same as the behavior of fixes/31 when so configured.
+
+The difference with the previous version of this feature in commit
c46e186c3b48c07e87331ece16e0858d2d9d4470
+is that the code used for choice "Clear last played position and exit" had the
same numerical
+value as the choice "Save position and exit" in fixes/31. This caused a change
in behavior when upgrading
+from fixes/31 to fixes/32.
+This is now avoided by using a numerical value that has not previously been used in this
context.
+
+Refs #543
+
+(cherry picked from commit a03fbcac8789f21c638f58907486e5344ece2975)
+---
+ mythtv/libs/libmythtv/tv_play.cpp | 20 ++++++++++++++++++-
+ mythtv/libs/libmythtv/tv_play.h | 3 ++-
+ .../programs/mythfrontend/globalsettings.cpp | 1 +
+ 3 files changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
+index 2803837fb23..78aa5c2f9f2 100644
+--- a/mythtv/libs/libmythtv/tv_play.cpp
++++ b/mythtv/libs/libmythtv/tv_play.cpp
+@@ -2717,13 +2717,19 @@ void TV::PrepToSwitchToRecordedProgram(const ProgramInfo
&ProgInfo)
+ void TV::PrepareToExitPlayer(int Line)
+ {
+ m_playerContext.LockDeletePlayer(__FILE__, Line);
+- if (m_savePosOnExit && m_player && m_playerContext.m_playingInfo)
++ if ((m_savePosOnExit || m_clearPosOnExit) && m_player &&
m_playerContext.m_playingInfo)
+ {
+ // Clear last play position when we're at the end of a recording.
+ // unless the recording is in-progress.
+ bool at_end = !StateIsRecording(m_playerContext.GetState()) &&
+ (GetEndOfRecording() || m_playerContext.m_player->IsNearEnd());
+
++ // Clear last play position on exit when the user requested this
++ if (m_clearPosOnExit)
++ {
++ at_end = true;
++ }
++
+ // Clear/Save play position without notification
+ // The change must be broadcast when file is no longer in use
+ // to update previews, ie. with the MarkNotInUse notification
+@@ -3899,6 +3905,10 @@ bool TV::ActiveHandleAction(const QStringList &Actions,
+ ShowOSDStopWatchingRecording();
+ return handled;
+ }
++ if (16 & m_dbPlaybackExitPrompt)
++ {
++ m_clearPosOnExit = true;
++ }
+ PrepareToExitPlayer(__LINE__);
+ m_requestDelete = false;
+ exit = true;
+@@ -9811,6 +9821,8 @@ void TV::ShowOSDStopWatchingRecording()
+
+ dialog.m_buttons.push_back({tr("Exit %1").arg(videotype), ACTION_STOP});
+
++ dialog.m_buttons.push_back({tr("Exit Without Saving"),
"DIALOG_VIDEOEXIT_CLEARLASTPLAYEDPOSITION_0"});
++
+ if (IsDeleteAllowed())
+ dialog.m_buttons.push_back({tr("Delete this recording"),
"DIALOG_VIDEOEXIT_CONFIRMDELETE_0"});
+
+@@ -9958,6 +9970,12 @@ bool TV::HandleOSDVideoExit(const QString& Action)
+ {
+ DoTogglePause(true);
+ }
++ else if (Action == "CLEARLASTPLAYEDPOSITION")
++ {
++ m_clearPosOnExit = true;
++ PrepareToExitPlayer(__LINE__);
++ SetExitPlayer(true, true);
++ }
+
+ return hide;
+ }
+diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
+index 6bc0acc587c..015e9f995f3 100644
+--- a/mythtv/libs/libmythtv/tv_play.h
++++ b/mythtv/libs/libmythtv/tv_play.h
+@@ -528,7 +528,7 @@ class MTV_PUBLIC TV : public TVPlaybackState, public
MythTVMenuItemDisplayer, pu
+ uint m_vbimode {VBIMode::None};
+ uint m_switchToInputId {0};
+
+- /// True if the user told MythTV to stop plaback. If this is false
++ /// True if the user told MythTV to stop playback. If this is false
+ /// when we exit the player, we display an error screen.
+ mutable bool m_wantsToQuit {true};
+ bool m_stretchAdjustment {false}; ///< True if time stretch is
turned on
+@@ -543,6 +543,7 @@ class MTV_PUBLIC TV : public TVPlaybackState, public
MythTVMenuItemDisplayer, pu
+ bool m_doSmartForward {false};
+ bool m_queuedTranscode {false};
+ bool m_savePosOnExit {false}; ///< False until first timer event
++ bool m_clearPosOnExit {false}; ///< False unless requested by user
on playback exit
+ /// Picture attribute type to modify.
+ PictureAdjustType m_adjustingPicture {kAdjustingPicture_None};
+ /// Picture attribute to modify (on arrow left or right)
+diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp
b/mythtv/programs/mythfrontend/globalsettings.cpp
+index e2fcc817adb..67bd6dd460d 100644
+--- a/mythtv/programs/mythfrontend/globalsettings.cpp
++++ b/mythtv/programs/mythfrontend/globalsettings.cpp
+@@ -1763,6 +1763,7 @@ static HostComboBoxSetting *PlaybackExitPrompt()
+ gc->setLabel(PlaybackSettings::tr("Action on playback exit"));
+
+ gc->addSelection(PlaybackSettings::tr("Just exit"), "0");
++ gc->addSelection(PlaybackSettings::tr("Clear last played position and
exit"), "16");
+ gc->addSelection(PlaybackSettings::tr("Always prompt (excluding Live
TV)"),
+ "1");
+ gc->addSelection(PlaybackSettings::tr("Always prompt (including Live
TV)"),
+
+From b615b139d85a4024307cdaf7ff2ff7b01e5cd513 Mon Sep 17 00:00:00 2001
+From: Bill Meek <billmeek(a)mythtv.org>
+Date: Sun, 12 Jun 2022 18:42:16 -0500
+Subject: [PATCH 49/66] UserJobs/Events: quotes in %MATCH% type variables can
+ cause lost text
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+All %MATCH% type variable contents used by a job/event are expanded
+into a QStringList.
+
+Quotes in %TITLE%, %SUBTITLE% and/or %DESCRIPTION% can cause their
+text to be truncated. And, if the user's script has following %MATCH%
+variables, lost text can end up in them.
+
+This commit replaces the " QUOTATION MARK (U+0022) with
+ ʺ MODIFIER LETTER DOUBLE PRIME (U+02BA)
+
+Just to compare the two: "ʺ"ʺ"ʺ"ʺ"ʺ.
+
+Forum URL:
https://forum.mythtv.org/viewtopic.php?f=36&t=4883
+
+(cherry picked from commit dd68df4676224979a625c379c60985e272af3b1a)
+---
+ mythtv/libs/libmyth/programinfo.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
+index 7f6fe7c421f..02079a7d691 100644
+--- a/mythtv/libs/libmyth/programinfo.cpp
++++ b/mythtv/libs/libmyth/programinfo.cpp
+@@ -5405,13 +5405,13 @@ void ProgramInfo::SubstituteMatches(QString &str)
+ }
+
+ str.replace(QString("%FILE%"), GetBasename());
+- str.replace(QString("%TITLE%"), m_title);
+- str.replace(QString("%SUBTITLE%"), m_subtitle);
++ str.replace(QString("%TITLE%"), m_title.replace("\"",
"ʺ"));
++ str.replace(QString("%SUBTITLE%"), m_subtitle.replace("\"",
"ʺ"));
+ str.replace(QString("%SEASON%"), QString::number(m_season));
+ str.replace(QString("%EPISODE%"), QString::number(m_episode));
+ str.replace(QString("%TOTALEPISODES%"),
QString::number(m_totalEpisodes));
+ str.replace(QString("%SYNDICATEDEPISODE%"), m_syndicatedEpisode);
+- str.replace(QString("%DESCRIPTION%"), m_description);
++ str.replace(QString("%DESCRIPTION%"),
m_description.replace("\"", "ʺ"));
+ str.replace(QString("%HOSTNAME%"), m_hostname);
+ str.replace(QString("%CATEGORY%"), m_category);
+ str.replace(QString("%RECGROUP%"), m_recGroup);
+
+From 365406638a4a9239e114e5ad3353d9411545a3d5 Mon Sep 17 00:00:00 2001
+From: Bill Meek <billmeek(a)mythtv.org>
+Date: Sat, 16 Jul 2022 14:41:20 -0500
+Subject: [PATCH 50/66] programinfo.cpp: adds comment about quotes in %MATCH%
+ variables
+
+(cherry picked from commit a31c085783948070a3840c5190370599043fd629)
+---
+ mythtv/libs/libmyth/programinfo.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
+index 02079a7d691..4e3f5fd36a8 100644
+--- a/mythtv/libs/libmyth/programinfo.cpp
++++ b/mythtv/libs/libmyth/programinfo.cpp
+@@ -5404,6 +5404,10 @@ void ProgramInfo::SubstituteMatches(QString &str)
+ str.replace(QString("%DIR%"), dirInfo.path());
+ }
+
++ // N.B. Contents of %MATCH% string variables get parsed into a single
++ // QStringLists. Quotes in strings will cause lost/truncated output.
++ // Replace QUOTATION MARK (U+0022)j with MODIFIER LETTER DOUBLE PRIME (U+02BA).
++
+ str.replace(QString("%FILE%"), GetBasename());
+ str.replace(QString("%TITLE%"), m_title.replace("\"",
"ʺ"));
+ str.replace(QString("%SUBTITLE%"), m_subtitle.replace("\"",
"ʺ"));
+
+From e72127d5d90151d338decbe1cc044c38cca5e203 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Fri, 22 Jul 2022 22:11:07 +0200
+Subject: [PATCH 51/66] SatIP SETUP status handling
+
+After SETUP, update status only after SETUP successful.
+This should enable a retry when the SETUP is not succesful.
+
+(cherry picked from commit 5d0147cb58e3a167dea3e55d753a24ad056360dc)
+---
+ .../libs/libmythtv/recorders/satipstreamhandler.cpp | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/mythtv/libs/libmythtv/recorders/satipstreamhandler.cpp
b/mythtv/libs/libmythtv/recorders/satipstreamhandler.cpp
+index 17e607a3329..5e76a8f42c7 100644
+--- a/mythtv/libs/libmythtv/recorders/satipstreamhandler.cpp
++++ b/mythtv/libs/libmythtv/recorders/satipstreamhandler.cpp
+@@ -171,9 +171,11 @@ void SatIPStreamHandler::run(void)
+ m_setupinvoked = false;
+ }
+
+- m_rtsp->Setup(m_tuningurl);
+- m_setupinvoked = true;
+- m_oldtuningurl = m_tuningurl;
++ if (m_rtsp->Setup(m_tuningurl))
++ {
++ m_oldtuningurl = m_tuningurl;
++ m_setupinvoked = true;
++ }
+
+ last_update.restart();
+ }
+@@ -287,6 +289,9 @@ bool SatIPStreamHandler::Tune(const DTVMultiplex &tuning)
+ if (rval)
+ {
+ rval = m_rtsp->Setup(m_tuningurl);
++ }
++ if (rval)
++ {
+ m_oldtuningurl = m_tuningurl;
+ m_setupinvoked = true;
+ }
+
+From d761e9f0565a7702daa7be15b84ab899e7af7156 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Tue, 26 Jul 2022 12:42:20 +0200
+Subject: [PATCH 52/66] Size of recording start time field in MythCenter-wide
+
+Increase the width of the field showing the recording
+start time in theme MythCenter-wide from 94 to 104.
+This makes the field wide enough to show time values
+in the AM/PM time presentation mode.
+
+Refs #578
+
+(cherry picked from commit 50c58fb05b20ba99460a2346c3ae5a479bb9ae0f)
+---
+ mythtv/themes/MythCenter-wide/recordings-ui.xml | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/mythtv/themes/MythCenter-wide/recordings-ui.xml
b/mythtv/themes/MythCenter-wide/recordings-ui.xml
+index 61ebab7e298..2a8ca1ab096 100644
+--- a/mythtv/themes/MythCenter-wide/recordings-ui.xml
++++ b/mythtv/themes/MythCenter-wide/recordings-ui.xml
+@@ -250,20 +250,20 @@
+ <state name="marked"></state>
+ </statetype>
+ <textarea name="titlesubtitle"
from="buttontext">
+- <area>32,2,618,28</area>
++ <area>32,2,608,28</area>
+ <align>vcenter</align>
+ </textarea>
+ <textarea name="watchedpercent"
from="buttontext">
+- <area>650,2,60,28</area>
++ <area>640,2,60,28</area>
+ <align>right,vcenter</align>
+ <template>%|watchedpercent|%%</template>
+ </textarea>
+ <textarea name="shortstartdate"
from="buttontext">
+- <area>710,2,70,28</area>
++ <area>700,2,70,28</area>
+ <align>right,vcenter</align>
+ </textarea>
+ <textarea name="starttime"
from="buttontext">
+- <area>780,2,94,28</area>
++ <area>770,2,104,28</area>
+ <align>right,vcenter</align>
+ </textarea>
+ <statetype name="watched">
+@@ -305,19 +305,19 @@
+ <align>vcenter</align>
+ </textarea>
+ <textarea name="titlesubtitle"
from="fonts">
+- <area>32,2,618,28</area>
++ <area>32,2,608,28</area>
+ </textarea>
+ <textarea name="watchedpercent"
from="fonts">
+- <area>650,2,60,28</area>
++ <area>640,2,60,28</area>
+ <align>right,vcenter</align>
+ <template>%|watchedpercent|%%</template>
+ </textarea>
+ <textarea name="shortstartdate"
from="fonts">
+- <area>710,2,70,28</area>
++ <area>700,2,70,28</area>
+ <align>right,vcenter</align>
+ </textarea>
+ <textarea name="starttime" from="fonts">
+- <area>780,2,94,28</area>
++ <area>770,2,104,28</area>
+ <align>right,vcenter</align>
+ </textarea>
+ </state>
+
+From 8550188f02d0c10402444f5e2e55d21352f3f38d Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Sat, 23 Jul 2022 13:48:00 +0200
+Subject: [PATCH 53/66] Add tuning data for Eutelsat 7 satellite
+
+This is the tuning data for one transponder on Eutelsat 7 from which
+all other transponders can be found with a "Full Scan (Tuned)".
+
+(cherry picked from commit 88c7d97dc94cf761cf20481da4770e1db5ee16e2)
+---
+ .../libs/libmythtv/channelscan/channelscanmiscsettings.h | 9 +++++----
+ mythtv/libs/libmythtv/channelscan/channelscanner.cpp | 2 --
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h
b/mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h
+index cf66557d4f9..773e4fa6ac9 100644
+--- a/mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h
++++ b/mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h
+@@ -231,10 +231,11 @@ class ScanTransponder: public TransMythUIComboBoxSetting
+ addSelection("(Select Satellite)", "Select", true);
+
+ // Satellite tuning data
+- m_tdm["Hotbird"] = { "Hotbird", "Hotbird 13.0E",
"12015000", "h", "27500000", "8PSK",
"DVB-S2", "3/4" };
+- m_tdm["Astra-1"] = { "Astra-1", "Astra-1 19.2E",
"11229000", "v", "22000000", "8PSK",
"DVB-S2", "2/3" };
+- m_tdm["Astra-3"] = { "Astra-3", "Astra-3 23.5E",
"12031500", "h", "27500000", "QPSK",
"DVB-S2", "auto"};
+- m_tdm["Astra-2"] = { "Astra-2", "Astra-2 28.2E",
"10714000", "h", "22000000", "QPSK",
"DVB-S", "5/6" };
++ m_tdm["1 E7"] = { "1 E7", "Eutelsat 7.0E",
"10804000", "v", "30000000", "QPSK",
"DVB-S2", "5/6" };
++ m_tdm["2 HB"] = { "2 HB", "Hotbird 13.0E",
"12015000", "h", "27500000", "8PSK",
"DVB-S2", "3/4" };
++ m_tdm["3 A1"] = { "3 A1", "Astra-1 19.2E",
"11229000", "v", "22000000", "8PSK",
"DVB-S2", "2/3" };
++ m_tdm["4 A3"] = { "4 A3", "Astra-3 23.5E",
"12031500", "h", "27500000", "QPSK",
"DVB-S2", "auto"};
++ m_tdm["5 A2"] = { "5 A2", "Astra-2 28.2E",
"10714000", "h", "22000000", "QPSK",
"DVB-S", "5/6" };
+
+ for (auto &td: m_tdm)
+ {
+diff --git a/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
b/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
+index 94e97078024..46bf7d77cc7 100644
+--- a/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
++++ b/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
+@@ -106,8 +106,6 @@ void ChannelScanner::Teardown(void)
+ }
+ }
+
+-// full scan of existing transports broken
+-// existing transport scan broken
+ void ChannelScanner::Scan(
+ int scantype,
+ uint cardid,
+
+From f458821fa0f7fd70bbba22469234d882b0ee7fe9 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Sun, 24 Jul 2022 17:43:25 +0200
+Subject: [PATCH 54/66] EIT fixup for Eutelsat 7.0E satellite
+
+Needed for the guide data in the Turkish language.
+
+(cherry picked from commit 109b9348c4ee077e0bece8bd3db01eaa51628ab1)
+---
+ mythtv/libs/libmythtv/eithelper.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/mythtv/libs/libmythtv/eithelper.cpp b/mythtv/libs/libmythtv/eithelper.cpp
+index 98c0572380b..901bb991236 100644
+--- a/mythtv/libs/libmythtv/eithelper.cpp
++++ b/mythtv/libs/libmythtv/eithelper.cpp
+@@ -1398,6 +1398,9 @@ static void init_fixup(FixupMap &fix)
+ fix[ 57LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
+ fix[ 58LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
+ fix[ 59LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
++
++ // Eutelsat Satellite System at 7°E
++ fix[ 126U << 16 ] = EITFixUp::kEFixForceISO8859_9;
+ }
+
+ /** \fn EITHelper::RescheduleRecordings(void)
+
+From 6e1706ee66c94dff097c2e3b91ff1d312d8992f5 Mon Sep 17 00:00:00 2001
+From: Scott Theisen <scott.the.elm(a)gmail.com>
+Date: Wed, 27 Jul 2022 14:06:10 -0400
+Subject: [PATCH 55/66] GitHub Actions: add Ubuntu 22.04 builder
+
+---
+ .github/workflows/buildfixes32.yml | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/.github/workflows/buildfixes32.yml b/.github/workflows/buildfixes32.yml
+index b9a557f9384..b1fe6f6d7e1 100644
+--- a/.github/workflows/buildfixes32.yml
++++ b/.github/workflows/buildfixes32.yml
+@@ -11,7 +11,7 @@ jobs:
+ name: build
+ strategy:
+ matrix:
+- os: ['ubuntu-18.04', 'ubuntu-20.04', 'macos-10.15',
'macos-11']
++ os: ['ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04',
'macos-10.15', 'macos-11']
+ cc: ['gcc', 'clang']
+ include:
+ - cc: 'gcc'
+@@ -79,10 +79,18 @@ jobs:
+ if: runner.os == 'Linux'
+
+ - name: Install plugin dependencies (linux)
+- run: sudo apt install libvorbis-dev libflac++-dev libminizip-dev libcdio-dev
libcdio-paranoia-dev python3-oauth python3-pycurl
++ run: sudo apt install libvorbis-dev libflac++-dev libminizip-dev libcdio-dev
libcdio-paranoia-dev python3-pycurl
+ libxml-xpath-perl libdate-manip-perl libdatetime-format-iso8601-perl
libsoap-lite-perl libjson-perl libimage-size-perl
+ if: runner.os == 'Linux'
+
++ - name: Install plugin dependencies (ubuntu-18.04 and ubuntu-20.04)
++ run: sudo apt install python3-oauth
++ if: matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04'
++
++ - name: Install plugin dependencies (ubuntu-22.04)
++ run: sudo apt install python3-oauthlib
++ if: matrix.os == 'ubuntu-22.04'
++
+ - name: Install plugin dependencies (macOS)
+ run: brew install minizip flac libvorbis libcdio
+ if: runner.os == 'macOS'
+
+From c9e66de14b1770ad09bdf1df39e65bf6a6c0f54a Mon Sep 17 00:00:00 2001
+From: Scott Theisen <scott.the.elm(a)gmail.com>
+Date: Wed, 27 Jul 2022 14:07:10 -0400
+Subject: [PATCH 56/66] GitHub Actions: update macOS versions
+
+The macOS-10.15 environment is deprecated and will be removed on August 30th, 2022.
+---
+ .github/workflows/buildfixes32.yml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/.github/workflows/buildfixes32.yml b/.github/workflows/buildfixes32.yml
+index b1fe6f6d7e1..22e312121ec 100644
+--- a/.github/workflows/buildfixes32.yml
++++ b/.github/workflows/buildfixes32.yml
+@@ -11,7 +11,7 @@ jobs:
+ name: build
+ strategy:
+ matrix:
+- os: ['ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04',
'macos-10.15', 'macos-11']
++ os: ['ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04',
'macos-11', 'macos-12']
+ cc: ['gcc', 'clang']
+ include:
+ - cc: 'gcc'
+
+From c11ed8650141bff134e8537eb984ce57e46fad79 Mon Sep 17 00:00:00 2001
+From: David Hampton <mythtv(a)love2code.net>
+Date: Fri, 29 Jul 2022 16:55:38 -0400
+Subject: [PATCH 57/66] Fix MythCenter-wide format to not duplicate year in
+ recordings page.
+
+Remove the 'startyear' field which apparently only contains a value in
+years before the current year? The display looks fine without it for
+both current and prior year recordings.
+
+Fixes #582.
+
+(cherry picked from commit 967910821b95d9b45678af3ca8be1128f3c189a0)
+---
+ mythtv/themes/MythCenter-wide/recordings-ui.xml | 2 +-
+ mythtv/themes/MythCenter-wide/themeinfo.xml | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mythtv/themes/MythCenter-wide/recordings-ui.xml
b/mythtv/themes/MythCenter-wide/recordings-ui.xml
+index 2a8ca1ab096..a4dd5bcb018 100644
+--- a/mythtv/themes/MythCenter-wide/recordings-ui.xml
++++ b/mythtv/themes/MythCenter-wide/recordings-ui.xml
+@@ -444,7 +444,7 @@
+ <textarea name="timedate" from="basetextarea">
+ <area>295,444,415,30</area>
+ <align>hcenter</align>
+- <template>%startdate%%| startyear%, %starttime% </template>
++ <template>%startdate%, %starttime% </template>
+ </textarea>
+
+ <textarea name="filesize_str" from="basetextarea">
+diff --git a/mythtv/themes/MythCenter-wide/themeinfo.xml
b/mythtv/themes/MythCenter-wide/themeinfo.xml
+index dd7442bb9c0..00d68afce33 100644
+--- a/mythtv/themes/MythCenter-wide/themeinfo.xml
++++ b/mythtv/themes/MythCenter-wide/themeinfo.xml
+@@ -34,7 +34,7 @@
+ <major>1</major>
+
+ <!-- Minor version changes are backwards compatible -->
+- <minor>9</minor>
++ <minor>10</minor>
+ </version>
+
+ <!-- Theme Details (Required) -->
+
+From cf553e438c0c2cf09a47aa9d40810f61e4ba1db5 Mon Sep 17 00:00:00 2001
+From: Bill Meek <bmeek(a)mythtv.org>
+Date: Wed, 27 Jul 2022 08:15:14 -0500
+Subject: [PATCH 58/66] Housekeeper: allows initial INSERTs to the housekeeping
+ table
+
+Fresh DBs have no entries in housekeeping. INSERTs weren't
+being made because the test that decided to do it always
+failed and caused an UPDATE. That did nothing because a
+matching tag wasn't found.
+
+Now, always do an UPDATE and if the no rows were affected,
+then do an INSERT.
+---
+ mythtv/libs/libmythbase/housekeeper.cpp | 97 +++++++++++++------------
+ 1 file changed, 50 insertions(+), 47 deletions(-)
+
+diff --git a/mythtv/libs/libmythbase/housekeeper.cpp
b/mythtv/libs/libmythbase/housekeeper.cpp
+index 637875f7e97..7eda555f04b 100644
+--- a/mythtv/libs/libmythbase/housekeeper.cpp
++++ b/mythtv/libs/libmythbase/housekeeper.cpp
+@@ -107,7 +107,6 @@ HouseKeeperTask::HouseKeeperTask(const QString &dbTag,
HouseKeeperScope scope,
+
+ bool HouseKeeperTask::CheckRun(const QDateTime& now)
+ {
+- LOG(VB_GENERAL, LOG_DEBUG, QString("Checking to run %1").arg(GetTag()));
+ bool check = false;
+ if (!m_confirm && !m_running && (check = DoCheckRun(now)))
+ {
+@@ -115,6 +114,8 @@ bool HouseKeeperTask::CheckRun(const QDateTime& now)
+ // and should not be queued a second time
+ m_confirm = true;
+ }
++ LOG(VB_GENERAL, LOG_DEBUG, QString("%1 Running? %2/In window? %3.")
++ .arg(GetTag()).arg(m_running ? "Yes" : "No").arg(check ?
"Yes" : "No"));
+ return check;
+ }
+
+@@ -227,52 +228,19 @@ QDateTime HouseKeeperTask::UpdateLastRun(const QDateTime& last,
bool successful)
+ if (!query.isConnected())
+ return last;
+
+- if (m_lastRun == MythDate::fromSecsSinceEpoch(0))
+- {
+- // not previously set, perform insert
+-
+- if (m_scope == kHKGlobal)
+- {
+- query.prepare("INSERT INTO housekeeping"
+- " (tag, lastrun, lastsuccess)"
+- " VALUES (:TAG, :TIME, :STIME)");
+- }
+- else
+- {
+- query.prepare("INSERT INTO housekeeping"
+- " (tag, hostname, lastrun,
lastsuccess)"
+- " VALUES (:TAG, :HOST, :TIME, :STIME)");
+- }
+- }
+- else
+- {
+- // previously set, perform update
+-
+- if (m_scope == kHKGlobal)
+- {
+- query.prepare("UPDATE housekeeping SET lastrun=:TIME,"
+- " lastsuccess=:STIME"
+- " WHERE tag = :TAG"
+- " AND hostname IS NULL");
+- }
+- else
+- {
+- query.prepare("UPDATE housekeeping SET lastrun=:TIME,"
+- " lastsuccess=:STIME"
+- " WHERE tag = :TAG"
+- " AND hostname = :HOST");
+- }
+- }
+-
+ if (m_scope == kHKGlobal)
+ {
+- LOG(VB_GENERAL, LOG_DEBUG,
+- QString("Updating global run time for %1").arg(m_dbTag));
++ query.prepare("UPDATE `housekeeping` SET `lastrun`=:TIME,"
++ " `lastsuccess`=:STIME"
++ " WHERE `tag` = :TAG"
++ " AND `hostname` IS NULL");
+ }
+ else
+ {
+- LOG(VB_GENERAL, LOG_DEBUG,
+- QString("Updating local run time for %1").arg(m_dbTag));
++ query.prepare("UPDATE `housekeeping` SET `lastrun`=:TIME,"
++ " `lastsuccess`=:STIME"
++ " WHERE `tag` = :TAG"
++ " AND `hostname` = :HOST");
+ }
+
+ if (m_scope == kHKLocal)
+@@ -282,7 +250,42 @@ QDateTime HouseKeeperTask::UpdateLastRun(const QDateTime& last,
bool successful)
+ query.bindValue(":STIME", MythDate::as_utc(m_lastSuccess));
+
+ if (!query.exec())
+- MythDB::DBError("HouseKeeperTask::updateLastRun", query);
++ MythDB::DBError("HouseKeeperTask::updateLastRun, UPDATE", query);
++
++ if (VERBOSE_LEVEL_CHECK(VB_GENERAL, LOG_DEBUG) &&
++ query.numRowsAffected() > 0)
++ {
++ LOG(VB_GENERAL, LOG_DEBUG, QString("%1: UPDATEd %2 run time.")
++ .arg(m_dbTag).arg(m_scope == kHKGlobal ? "global" :
"local"));
++ }
++
++ if (query.numRowsAffected() == 0)
++ {
++ if (m_scope == kHKGlobal)
++ {
++ query.prepare("INSERT INTO `housekeeping`"
++ " (`tag`, `lastrun`, `lastsuccess`)"
++ " VALUES (:TAG, :TIME, :STIME)");
++ }
++ else
++ {
++ query.prepare("INSERT INTO `housekeeping`"
++ " (`tag`, `hostname`, `lastrun`,
`lastsuccess`)"
++ " VALUES (:TAG, :HOST, :TIME, :STIME)");
++ }
++
++ if (m_scope == kHKLocal)
++ query.bindValue(":HOST", gCoreContext->GetHostName());
++ query.bindValue(":TAG", m_dbTag);
++ query.bindValue(":TIME", MythDate::as_utc(m_lastRun));
++ query.bindValue(":STIME", MythDate::as_utc(m_lastSuccess));
++
++ if (!query.exec())
++ MythDB::DBError("HouseKeeperTask::updateLastRun INSERT",
query);
++
++ LOG(VB_GENERAL, LOG_DEBUG, QString("%1: INSERTed %2 run time.")
++ .arg(m_dbTag).arg(m_scope == kHKGlobal ? "global" :
"local"));
++ }
+ }
+
+ QString msg;
+@@ -676,10 +679,10 @@ void HouseKeeper::Start(void)
+ return;
+
+ MSqlQuery query(MSqlQuery::InitCon());
+- query.prepare("SELECT tag,lastrun"
+- " FROM housekeeping"
+- " WHERE hostname = :HOST"
+- " OR hostname IS NULL");
++ query.prepare("SELECT `tag`,`lastrun`"
++ " FROM `housekeeping`"
++ " WHERE `hostname` = :HOST"
++ " OR `hostname` IS NULL");
+ query.bindValue(":HOST", gCoreContext->GetHostName());
+
+ if (!query.exec())
+
+From e5c974e40248d335be477a02fa5742582690e2d9 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Sat, 13 Aug 2022 18:37:55 +0200
+Subject: [PATCH 59/66] Revert "Potential memory corruption problems in
+ audiooutputbase"
+
+This reverts commit 81aeb49c456ff4ecab82c2297b22c38bd70d706d.
+
+Rationale:
+This commit creates problems with recognition of 5.1 audio devices, see the thread
+in mythtv-users "Digital audio Capability grayed out" from James Abernathy.
+
+The problem is that the field "Digital Audio Capabilities" is always disabled
+(shown as grey and not accessible) independent of the selected audio device.
+Correct behavior is that when a digital output such as HDMI is selected that
+it is then possible to select the capabilities of that digital output.
+This is not possible when the field is disabled.
+
+I see the following two changes in this commit:
+Around line 198 the "bugfix: don't allocate".
+The original code creates a copy of the complete struct pointed to by
m_outputSettingsDigitalRaw; then
+the Users are added and that is then saved in m_outputSettingsDigital.
+This means the m_outputSettingsDigitalRaw and m_outputSettingsDigital are always
different addresses.
+
+The "bugfix: don't allocate" code changes this by copying the pointer value
from m_outputSettingsDigitalRaw, then
+the Users are added and then it is saved in m_outputSettingsDigital.
+
+This does change two things:
+- The m_outputSettingsDigitalRaw and m_outputSettingsDigital now point to the same
struct, so the pointer values are the same.
+- The m_outputSettingsDigitalRaw has been modified by adding the users, so it is not the
Raw data anymore.
+Note that if the idea is that m_outputSettingsDigital and m_outputSettingsDigitalRaw
point to the same data then one pointer would be enough.
+My conclusion is that this must be the change that causes the device recognition
problems.
+
+The "bugfix: don't allocate" code then causes problems in the destructor
where now m_outputSettingsDigitalRaw
+and m_outputSettingsDigital point to the same object and have the same value.
+To protect against twice deleting the same memory the code starting at line 93
+"// These all seem to be the same pointer, avoid freeing multiple times"
+has been added.
+
+To summarize my analysis:
+- The "bugfix: don't allocate" code does create the problem in device
recognition by copying a pointer instead of copying a struct.
+- The fix in the destructor is only needed as a consequence of this.
+
+Reverting the commit and then checking the behavior of the code with valgrind does not
show memory corruption problems.
+
+(cherry picked from commit c370f513cce8f4bb01d7bada7a10e2dcfeae3e24)
+---
+ mythtv/libs/libmyth/audio/audiooutputbase.cpp | 19 +++++++------------
+ 1 file changed, 7 insertions(+), 12 deletions(-)
+
+diff --git a/mythtv/libs/libmyth/audio/audiooutputbase.cpp
b/mythtv/libs/libmyth/audio/audiooutputbase.cpp
+index d920d14dd0c..69c28f2cc3d 100644
+--- a/mythtv/libs/libmyth/audio/audiooutputbase.cpp
++++ b/mythtv/libs/libmyth/audio/audiooutputbase.cpp
+@@ -90,18 +90,13 @@ AudioOutputBase::~AudioOutputBase()
+ "~AudioOutputBase called, but KillAudio has not been
called!");
+
+ // We got this from a subclass, delete it
+- // These all seem to be the same pointer, avoid freeing multiple times
+- VBAUDIO(QString("m_outputSettings != m_outputSettingsDigital :
%1").arg(m_outputSettings != m_outputSettingsDigital));
+- if (m_outputSettingsDigital != m_outputSettings)
++ delete m_outputSettings;
++ delete m_outputSettingsRaw;
++ if (m_outputSettings != m_outputSettingsDigital)
+ {
+- if (m_outputSettingsDigitalRaw != m_outputSettingsDigital &&
m_outputSettingsDigitalRaw != m_outputSettings)
+- delete m_outputSettingsDigitalRaw;
+ delete m_outputSettingsDigital;
++ delete m_outputSettingsDigitalRaw;
+ }
+- VBAUDIO(QString("m_outputSettingsRaw != m_outputSettings
%1").arg(m_outputSettingsRaw != m_outputSettings));
+- if (m_outputSettingsRaw != m_outputSettings)
+- delete m_outputSettingsRaw;
+- delete m_outputSettings;
+
+ if (m_kAudioSRCOutputSize > 0)
+ delete[] m_srcOut;
+@@ -195,9 +190,9 @@ AudioOutputSettings* AudioOutputBase::GetOutputSettingsUsers(bool
digital)
+ else if (m_outputSettingsDigital)
+ return m_outputSettingsDigital;
+
+- //bugfix: don't allocate as GetOutputSettings will do it
+- //auto* aosettings = new AudioOutputSettings;
+- AudioOutputSettings* aosettings = GetOutputSettingsCleaned(digital);
++ auto* aosettings = new AudioOutputSettings;
++
++ *aosettings = *GetOutputSettingsCleaned(digital);
+ aosettings->GetUsers();
+
+ if (digital)
+
+From 6c0b5cc5c37507b9fb454a137092be5b61b4f137 Mon Sep 17 00:00:00 2001
+From: ulmus-scott <scott.the.elm(a)gmail.com>
+Date: Sat, 8 Jan 2022 19:06:02 -0500
+Subject: [PATCH 60/66] libmythfreemheg: replace nonstandard <malloc.h> with
+ <cstdlib>
+
+(cherry picked from commit 30f8922d548cbedeac8f72692f0f0b22003af48f)
+---
+ mythtv/libs/libmythfreemheg/BaseClasses.h | 5 ++---
+ mythtv/libs/libmythfreemheg/ParseBinary.cpp | 1 +
+ mythtv/libs/libmythfreemheg/ParseText.cpp | 3 +++
+ mythtv/libs/libmythfreemheg/ParseText.h | 2 ++
+ 4 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/mythtv/libs/libmythfreemheg/BaseClasses.h
b/mythtv/libs/libmythfreemheg/BaseClasses.h
+index 587e3fbd37a..27ef64e6173 100644
+--- a/mythtv/libs/libmythfreemheg/BaseClasses.h
++++ b/mythtv/libs/libmythfreemheg/BaseClasses.h
+@@ -23,9 +23,8 @@
+ #define BASECLASSES_H
+
+ #include "config.h"
+-#if HAVE_MALLOC_H
+-#include <malloc.h>
+-#endif
++
++#include <cstdlib> // malloc etc.
+
+ #include <array>
+ #include <QString>
+diff --git a/mythtv/libs/libmythfreemheg/ParseBinary.cpp
b/mythtv/libs/libmythfreemheg/ParseBinary.cpp
+index 83c50e84e3d..98c1ef36aca 100644
+--- a/mythtv/libs/libmythfreemheg/ParseBinary.cpp
++++ b/mythtv/libs/libmythfreemheg/ParseBinary.cpp
+@@ -23,6 +23,7 @@
+ Parser for ASN1 binary notation. Does minimal syntax checking, assuming that this will
already have
+ been done before the binary was produced. Creates a MHParseNode tree structure.
+ */
++#include <cstdlib> // malloc etc.
+
+ #include "Engine.h"
+ #include "ParseBinary.h"
+diff --git a/mythtv/libs/libmythfreemheg/ParseText.cpp
b/mythtv/libs/libmythfreemheg/ParseText.cpp
+index dd7c98a996d..56fecdf4036 100644
+--- a/mythtv/libs/libmythfreemheg/ParseText.cpp
++++ b/mythtv/libs/libmythfreemheg/ParseText.cpp
+@@ -25,6 +25,9 @@ This is very basic and is only there to enable some test programs to be
run.
+ */
+
+ #include "ParseText.h"
++
++#include <cstdlib> // malloc etc.
++
+ #include "ParseNode.h"
+ #include "BaseClasses.h"
+ #include "ASN1Codes.h"
+diff --git a/mythtv/libs/libmythfreemheg/ParseText.h
b/mythtv/libs/libmythfreemheg/ParseText.h
+index f63adc1a47f..12f478517c0 100644
+--- a/mythtv/libs/libmythfreemheg/ParseText.h
++++ b/mythtv/libs/libmythfreemheg/ParseText.h
+@@ -23,6 +23,8 @@
+ #if !defined(PARSETEXT_H)
+ #define PARSETEXT_H
+
++#include <cstdlib> // malloc etc.
++
+ class MHGroup;
+
+ #include "ParseNode.h"
+
+From 659a080e9a545114295cef8dc8ea34e4d9f1d8ee Mon Sep 17 00:00:00 2001
+From: ulmus-scott <scott.the.elm(a)gmail.com>
+Date: Sat, 8 Jan 2022 19:15:25 -0500
+Subject: [PATCH 61/66] configure: remove unused malloc.h and memalign checks
+
+(cherry picked from commit 47c6ed9d34dfaebb91e7f43cdb426586873dcf2b)
+---
+ mythtv/configure | 15 ---------------
+ 1 file changed, 15 deletions(-)
+
+diff --git a/mythtv/configure b/mythtv/configure
+index fda2057a282..3540f4a1885 100755
+--- a/mythtv/configure
++++ b/mythtv/configure
+@@ -1670,7 +1670,6 @@ HEADERS_LIST="
+ mach_mach_time_h
+ machine_ioctl_bt848_h
+ machine_ioctl_meteor_h
+- malloc_h
+ mntent_h
+ opencv2_core_core_c_h
+ OpenGL_gl3_h
+@@ -1741,7 +1740,6 @@ MATH_FUNCS="
+
+ SYSTEM_FUNCS="
+ access
+- aligned_malloc
+ arc4random
+ clock_gettime
+ closesocket
+@@ -1774,13 +1772,11 @@ SYSTEM_FUNCS="
+ lzo1x_999_compress
+ mach_absolute_time
+ MapViewOfFile
+- memalign
+ mkstemp
+ mmap
+ mprotect
+ nanosleep
+ PeekNamedPipe
+- posix_memalign
+ pthread_cancel
+ sched_getaffinity
+ SetConsoleTextAttribute
+@@ -4800,7 +4796,6 @@ case $target_os in
+ disable dv1394
+ disable dvb
+ disable ceton
+- enable memalign_hack
+ disable mythtranscode
+ disable network
+ enable opengl
+@@ -5677,10 +5672,6 @@ case "$custom_allocator" in
+ ;;
+ esac
+
+-check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
+-check_func ${malloc_prefix}memalign && enable memalign
+-check_func ${malloc_prefix}posix_memalign && enable posix_memalign
+-
+ check_func access
+ check_func_headers stdlib.h arc4random
+ check_func_headers time.h clock_gettime ||
+@@ -7095,12 +7086,6 @@ check_deps $CONFIG_LIST \
+
+ enabled threads && ! enabled pthreads && ! enabled atomics_native
&& die "non pthread threading without atomics not supported, try adding
--enable-pthreads or --cpu=i486 or higher if you are on x86"
+
+-
+-if test $target_os = "haiku"; then
+- disable memalign
+- disable posix_memalign
+-fi
+-
+ # add_dep lib dep
+ # -> enable ${lib}_deps_${dep}
+ # -> add $dep to ${lib}_deps only once
+
+From 668f9409cef9f8de41331629264c6b7c8626ddb3 Mon Sep 17 00:00:00 2001
+From: ulmus-scott <scott.the.elm(a)gmail.com>
+Date: Sat, 8 Jan 2022 19:45:16 -0500
+Subject: [PATCH 62/66] libmythfreemheg/BaseClasses.h: remove unnecessary
+ include "config.h"
+
+Programs.cpp needed reordering of includes for HAVE_GETTIMEOFDAY (-Wundef)
+
+(cherry picked from commit d5d9cf320c73ca10830d3209503a73795e6adb48)
+---
+ mythtv/libs/libmythfreemheg/BaseClasses.h | 2 --
+ mythtv/libs/libmythfreemheg/Programs.cpp | 6 +++---
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/mythtv/libs/libmythfreemheg/BaseClasses.h
b/mythtv/libs/libmythfreemheg/BaseClasses.h
+index 27ef64e6173..4538809052b 100644
+--- a/mythtv/libs/libmythfreemheg/BaseClasses.h
++++ b/mythtv/libs/libmythfreemheg/BaseClasses.h
+@@ -22,8 +22,6 @@
+ #if !defined(BASECLASSES_H)
+ #define BASECLASSES_H
+
+-#include "config.h"
+-
+ #include <cstdlib> // malloc etc.
+
+ #include <array>
+diff --git a/mythtv/libs/libmythfreemheg/Programs.cpp
b/mythtv/libs/libmythfreemheg/Programs.cpp
+index ba58f6773c6..1e85c6bb564 100644
+--- a/mythtv/libs/libmythfreemheg/Programs.cpp
++++ b/mythtv/libs/libmythfreemheg/Programs.cpp
+@@ -32,6 +32,9 @@
+ #include "freemheg.h"
+ #include "mythrandom.h"
+
++#include "config.h"
++#include "compat.h"
++
+ #include <QDateTime>
+ #include <QLocale>
+ #include <QStringList>
+@@ -46,9 +49,6 @@
+ #include <ctime>
+ #endif
+
+-#include "config.h"
+-#include "compat.h"
+-
+ /*
+ * Resident programs are subroutines to provide various string and date functions
+ * but also interface to surrounding tuner. They are defined in the UK MHEG profile.
+
+From dfb1bc1fd309702b71dcbc5e8029c36b63d09294 Mon Sep 17 00:00:00 2001
+From: ulmus-scott <scott.the.elm(a)gmail.com>
+Date: Sat, 8 Jan 2022 20:27:39 -0500
+Subject: [PATCH 63/66] libmythfreemheg/Programs.cpp: remove unnecessary
+ includes
+
+<sys/timeb.h> is unused
+<sys/time.h> is unconditionally included by mythchrono.h but not used directly
+
+<ctime> is used unconditionally
+
+(cherry picked from commit adda7f2401107421c9832b954ab4ff49277cbba9)
+---
+ mythtv/libs/libmythfreemheg/Programs.cpp | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/mythtv/libs/libmythfreemheg/Programs.cpp
b/mythtv/libs/libmythfreemheg/Programs.cpp
+index 1e85c6bb564..ce593841414 100644
+--- a/mythtv/libs/libmythfreemheg/Programs.cpp
++++ b/mythtv/libs/libmythfreemheg/Programs.cpp
+@@ -40,14 +40,9 @@
+ #include <QStringList>
+ #include <QUrl>
+ #include <QUrlQuery>
+-#if HAVE_GETTIMEOFDAY == 0
+-#include <sys/timeb.h>
+-#endif
+-#ifdef __FreeBSD__
+-#include <sys/time.h>
+-#else
++
+ #include <ctime>
+-#endif
++
+
+ /*
+ * Resident programs are subroutines to provide various string and date functions
+
+From b135b27364812ef1bbc65baa3712abd55cc04882 Mon Sep 17 00:00:00 2001
+From: ulmus-scott <scott.the.elm(a)gmail.com>
+Date: Sat, 8 Jan 2022 20:47:12 -0500
+Subject: [PATCH 64/66] libmythfreemheg/Programs.cpp: remove more unnecessary
+ headers
+
+no symbols are used from either (myth)config.h or compat.h
+
+(cherry picked from commit 2b2f27471b6d2e19b680015e1d99e605faf896db)
+---
+ mythtv/libs/libmythfreemheg/Programs.cpp | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/mythtv/libs/libmythfreemheg/Programs.cpp
b/mythtv/libs/libmythfreemheg/Programs.cpp
+index ce593841414..351dc5ded8e 100644
+--- a/mythtv/libs/libmythfreemheg/Programs.cpp
++++ b/mythtv/libs/libmythfreemheg/Programs.cpp
+@@ -32,9 +32,6 @@
+ #include "freemheg.h"
+ #include "mythrandom.h"
+
+-#include "config.h"
+-#include "compat.h"
+-
+ #include <QDateTime>
+ #include <QLocale>
+ #include <QStringList>
+
+From b6ef30288fd81d93d2c3ad34ac9adb61c257aebb Mon Sep 17 00:00:00 2001
+From: ulmus-scott <scott.the.elm(a)gmail.com>
+Date: Sun, 9 Jan 2022 04:02:29 -0500
+Subject: [PATCH 65/66] libmythfreemheg/Programs.cpp: finish conversion to
+ QDateTime
+
+<ctime> and "mythchrono.h" are no longer needed
+
+The QDateTime conversion in FormatDate was incorrect. fromMSecsSinceEpoch instead of
fromSecsSinceEpoch
+
+However, no one must use FormatDate since that error is from
0d195a9c6598f8b7d3a3e46a129ce03a1ffbaf09 on 2020-07-02.
+
+(cherry picked from commit b987f5bbaff2d820bd1967348a5abb98bcb82dd2)
+---
+ mythtv/libs/libmythfreemheg/Programs.cpp | 67 +++++++++++++++++-------
+ 1 file changed, 47 insertions(+), 20 deletions(-)
+
+diff --git a/mythtv/libs/libmythfreemheg/Programs.cpp
b/mythtv/libs/libmythfreemheg/Programs.cpp
+index 351dc5ded8e..5035ed2491e 100644
+--- a/mythtv/libs/libmythfreemheg/Programs.cpp
++++ b/mythtv/libs/libmythfreemheg/Programs.cpp
+@@ -18,8 +18,8 @@
+ Or, point your browser to
http://www.gnu.org/copyleft/gpl.html
+
+ */
+-
+-#include "mythchrono.h"
++#include <algorithm>
++#include <limits>
+
+ #include "Programs.h"
+ #include "Ingredients.h"
+@@ -38,9 +38,6 @@
+ #include <QUrl>
+ #include <QUrlQuery>
+
+-#include <ctime>
+-
+-
+ /*
+ * Resident programs are subroutines to provide various string and date functions
+ * but also interface to surrounding tuner. They are defined in the UK MHEG profile.
+@@ -152,6 +149,34 @@ static void GetString(MHParameter *parm, MHOctetString &str,
MHEngine *engine)
+ str.Copy(un.m_strVal);
+ }
+
++/** @brief Midnight on 17 November 1858, the epoch of the modified Julian day.
++
++This is Qt::LocalTime, to match GetCurrentDate's use of local time.
++
++ETSI ES 202 184 V2.4.1 (2016-06) does not mention timezones.
++§11.10.4.2 GetCurrentDate "Retrieves the current @e local date and time."
++Emphasis mine.
++
++Therefore, for consistency, I will assume all dates are in the local timezone.
++Thus, the meaning of FormatDate using the output of GetCurrentDate is equivalent
++to QDateTime::currentDateTime().toString(…) with a suitably converted format string.
++*/
++static const QDateTime k_mJD_epoch = QDateTime(QDate(1858, 11, 17), QTime(0, 0),
Qt::LocalTime);
++
++// match types with Qt
++static inline QDateTime recoverDateTime(int64_t mJDN, int64_t seconds)
++{
++ QDateTime dt = k_mJD_epoch;
++ return dt.addDays(mJDN).addSecs(seconds);
++}
++
++static void GetCurrentDate(int64_t& mJDN, int& seconds)
++{
++ auto dt = QDateTime::currentDateTime();
++ mJDN = k_mJD_epoch.daysTo(dt); // returns a qint64
++ seconds = dt.time().msecsSinceStartOfDay() / 1000;
++}
++
+ void MHResidentProgram::CallProgram(bool fIsFork, const MHObjectRef &success, const
MHSequence<MHParameter *> &args, MHEngine *engine)
+ {
+ if (! m_fAvailable)
+@@ -170,13 +195,10 @@ void MHResidentProgram::CallProgram(bool fIsFork, const MHObjectRef
&success, co
+ {
+ if (args.Size() == 2)
+ {
+- // Adjust the time to local. TODO: Check this.
+- auto epochSeconds = nowAsDuration<std::chrono::seconds>(true);
+- // Time as seconds since midnight.
+- int nTimeAsSecs = (epochSeconds % 24h).count();
+- // Modified Julian date as number of days since 17th November 1858.
+- // 1st Jan 1970 was date 40587.
+- int nModJulianDate = 40587 + epochSeconds / 24h;
++ int64_t mJDN = 0;
++ int nTimeAsSecs = 0;
++ GetCurrentDate(mJDN, nTimeAsSecs);
++ int nModJulianDate = std::clamp<int64_t>(mJDN, 0,
std::numeric_limits<int>::max());
+
+
engine->FindObject(*(args.GetAt(0)->GetReference()))->SetVariableValue(nModJulianDate);
+
engine->FindObject(*(args.GetAt(1)->GetReference()))->SetVariableValue(nTimeAsSecs);
+@@ -197,9 +219,8 @@ void MHResidentProgram::CallProgram(bool fIsFork, const MHObjectRef
&success, co
+ GetString(args.GetAt(0), format, engine);
+ int date = GetInt(args.GetAt(1), engine); // As produced in GCD
+ int time = GetInt(args.GetAt(2), engine);
+- // Convert to a Unix date (secs since 1st Jan 1970) but adjusted for
time zone.
+- time_t timet = (date - 40587) * (24 * 60 * 60) + time;
+- QDateTime dt = QDateTime::fromMSecsSinceEpoch(timet);
++
++ QDateTime dt = recoverDateTime(date, time);
+ MHOctetString result;
+
+ for (int i = 0; i < format.Size(); i++)
+@@ -270,11 +291,17 @@ void MHResidentProgram::CallProgram(bool fIsFork, const MHObjectRef
&success, co
+ if (args.Size() == 2)
+ {
+ int date = GetInt(args.GetAt(0), engine); // Date as produced in GCD
+- // Convert to a Unix date (secs since 1st Jan 1970) but adjusted for
time zone.
+- time_t timet = (date - 40587) * (24 * 60 * 60);
+- struct tm *timeStr = gmtime(&timet);
+- // 0 => Sunday, 1 => Monday etc.
+-
engine->FindObject(*(args.GetAt(1)->GetReference()))->SetVariableValue(timeStr->tm_wday);
++ QDateTime dt = recoverDateTime(date, 0);
++ // ETSI ES 202 184 V2.4.1 (2016-06) §11.10.4.4 GetDayOfWeek
++ // specifies "0 represents Sunday, 1 Monday, etc."
++
++ int dayOfWeek = dt.date().dayOfWeek();
++ // Gregorian calendar, returns 0 if invalid, 1 = Monday to 7 = Sunday
++ if (dayOfWeek == 7)
++ {
++ dayOfWeek = 0;
++ }
++
engine->FindObject(*(args.GetAt(1)->GetReference()))->SetVariableValue(dayOfWeek);
+ SetSuccessFlag(success, true, engine);
+ }
+ else
+
+From ba52c132238b16a4bbca3d243c8ee9dd483bc3da Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Wed, 19 Oct 2022 22:07:21 +0200
+Subject: [PATCH 66/66] Live TV select channel from another video source
+
+In Live TV mode it is possible to select any other channel by entering the channel
number.
+In fixes/32 and in master this is broken; it is now only possible to select a channel in
+the same video source as the current channel.
+Fixed by removing a static_cast in two lines in function get_chanid that was introduced
+in commit 976989051502f54abb7173f9e9127f25f8fd6c13 on September 29, 2020.
+
+(cherry picked from commit 61b82f2b5a4124c4369fa9ae1b408b6d36251e05)
+---
+ mythtv/libs/libmythtv/tv_play.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
+index 78aa5c2f9f2..8c812ccc499 100644
+--- a/mythtv/libs/libmythtv/tv_play.cpp
++++ b/mythtv/libs/libmythtv/tv_play.cpp
+@@ -5956,19 +5956,20 @@ static uint get_chanid(const PlayerContext *ctx,
+ {
+ uint chanid = 0;
+ uint cur_sourceid = 0;
++
+ // try to find channel on current input
+ if (ctx && ctx->m_playingInfo &&
ctx->m_playingInfo->GetSourceID())
+ {
+ cur_sourceid = ctx->m_playingInfo->GetSourceID();
+- chanid = std::max(static_cast<uint>(ChannelUtil::GetChanID(cur_sourceid,
channum)), 0U);
++ chanid = std::max(ChannelUtil::GetChanID(cur_sourceid, channum), 0);
+ if (chanid)
+ return chanid;
+ }
+- // try to find channel on specified input
+
++ // try to find channel on specified input
+ uint sourceid = CardUtil::GetSourceID(cardid);
+ if (cur_sourceid != sourceid && sourceid)
+- chanid = std::max(static_cast<uint>(ChannelUtil::GetChanID(sourceid,
channum)), 0U);
++ chanid = std::max(ChannelUtil::GetChanID(sourceid, channum), 0);
+ return chanid;
+ }
+