Skip to content

Commit

Permalink
Commit text
Browse files Browse the repository at this point in the history
Lock access to m_tsAvListeners in mpegstreamdata.cpp

Use the m_listenerLock for all usage of m_tsAvListeners
in mpegstreamdata.cpp. This lock was used in some places
but not everywhere.
This has caused segfaults in mythbackend, observed when
testing recent IPTV bug fixes.
  • Loading branch information
kmdewaal committed Nov 30, 2024
1 parent a27a196 commit e9ebc3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit e9ebc3b

Please sign in to comment.