Ticket #5516: libs_libmythtv-missing-lock.patch

File libs_libmythtv-missing-lock.patch, 761 bytes (added by Erik Hovland <erik@…>, 13 years ago)

wraps readblocksize with a lock

  • mythtv/libs/libmythtv/RingBuffer.cpp

    A variable has been identified as requiring a lock held
    
    From: Erik Hovland <erik@hovland.org>
    
    while it is being processed.
    ---
    
     mythtv/libs/libmythtv/RingBuffer.cpp |    2 ++
     1 files changed, 2 insertions(+), 0 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/RingBuffer.cpp b/mythtv/libs/libmythtv/RingBuffer.cpp
    index bd85c81..2c43b92 100644
    a b void RingBuffer::OpenFile(const QString &lfilename, uint retryCount) 
    268268    else if (is_dvd)
    269269    {
    270270        dvdPriv->OpenFile(filename);
     271        pthread_rwlock_wrlock(&rwlock);
    271272        readblocksize = DVD_BLOCK_SIZE * 62;
     273        pthread_rwlock_unlock(&rwlock);
    272274    }
    273275#endif // USING_FRONTEND
    274276    else