From 0b5733e0100c1ffe4723b483119161fb1db56521 Mon Sep 17 00:00:00 2001 From: Klaas de Waal Date: Sat, 30 Nov 2024 18:15:33 +0100 Subject: [PATCH] Lock access to m_tsWritingListeners in mpegstreamdata.cpp Use the m_listenerLock for all usage of m_tsWritingListeners in mpegstreamdata.cpp. This lock was already used in all places except one. --- mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp b/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp index d69c6ef1c5e..db91c4850c4 100644 --- a/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp +++ b/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp @@ -1068,6 +1068,8 @@ bool MPEGStreamData::ProcessTSPacket(const TSPacket& tspacket) if (IsWritingPID(tspacket.PID())) { + QMutexLocker locker(&m_listenerLock); + for (auto & listener : m_tsWritingListeners) listener->ProcessTSPacket(tspacket); }