Ticket #9864: 9864-master-v1.patch

File 9864-master-v1.patch, 883 bytes (added by danielk, 8 years ago)

Possible fix.

  • mythtv/libs/libmythtv/ringbuffer.cpp

    diff --git a/mythtv/libs/libmythtv/ringbuffer.cpp b/mythtv/libs/libmythtv/ringbuffer.cpp
    index 583ff9f..2d731c8 100644
    a b void RingBuffer::run(void) 
    853853
    854854        int used = bufferSize - ReadBufFree();
    855855
     856        bool reads_were_allowed = readsallowed;
     857
    856858        if ((0 == read_return) || (numfailures > 5) ||
    857859            (readsallowed != (used >= fill_min || ateof ||
    858860                              setswitchtonext || commserror)))
    void RingBuffer::run(void) 
    909911        else
    910912        {
    911913            // yield if we have nothing to do...
    912             if (!request_pause &&
     914            if (!request_pause && reads_were_allowed &&
    913915                (used >= fill_threshold || ateof || setswitchtonext))
    914916            {
    915917                generalWait.wait(&rwlock, 50);