diff --git a/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp b/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp index 6b7792c4428..d69c6ef1c5e 100644 --- a/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp +++ b/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp @@ -1048,6 +1048,8 @@ bool MPEGStreamData::ProcessTSPacket(const TSPacket& tspacket) if (IsVideoPID(tspacket.PID())) { + QMutexLocker locker(&m_listenerLock); + for (auto & listener : m_tsAvListeners) listener->ProcessVideoTSPacket(tspacket); @@ -1056,6 +1058,8 @@ bool MPEGStreamData::ProcessTSPacket(const TSPacket& tspacket) if (IsAudioPID(tspacket.PID())) { + QMutexLocker locker(&m_listenerLock); + for (auto & listener : m_tsAvListeners) listener->ProcessAudioTSPacket(tspacket);