Ticket #3690: 3690.patch

File 3690.patch, 594 bytes (added by Anduin Withers, 17 years ago)

quick nop seeks

  • libs/libmythtv/RingBuffer.cpp

     
    11811181    pthread_rwlock_wrlock(&rwlock);
    11821182    wantseek = false;
    11831183
     1184    // optimize nop seeks
     1185    if ((whence == SEEK_SET && pos == readpos) ||
     1186        (whence == SEEK_CUR && pos == 0))
     1187    {
     1188        pthread_rwlock_unlock(&rwlock);
     1189        return readpos;
     1190    }
     1191
    11841192    long long ret = -1;
    11851193    if (remotefile)
    11861194        ret = remotefile->Seek(pos, whence, readpos);