Skip to content

Commit

Permalink
RingBuffer: Fix the read position on re-creation of the buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Kendall committed Jun 6, 2011
1 parent 7079e82 commit 88f3e77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/ringbuffer.cpp
Expand Up @@ -675,7 +675,8 @@ void RingBuffer::CreateReadAheadBuffer(void)
memcpy(newbuffer + (oldsize - rbwpos), readAheadBuffer, rbwpos);
delete [] readAheadBuffer;
readAheadBuffer = newbuffer;
rbrpos = rbrpos + oldsize - rbwpos;
rbrpos = (rbrpos > rbwpos) ? (rbrpos - rbwpos) :
(rbrpos + oldsize - rbwpos);
rbwpos = oldsize;
}
else
Expand Down

0 comments on commit 88f3e77

Please sign in to comment.