diff --git a/src/mpegparser/MPEGVideoBuffer.cpp b/src/mpegparser/MPEGVideoBuffer.cpp index 67982b0ad..99b6f03a0 100644 --- a/src/mpegparser/MPEGVideoBuffer.cpp +++ b/src/mpegparser/MPEGVideoBuffer.cpp @@ -44,7 +44,7 @@ int32_t MPEGVideoBuffer::FindStartCode(uint32_t startPos){ if(window < 4) //Make sure we have enough bytes to search. return -1; - for(unsigned int i = startPos; i < (window - 3); i++){ + for(unsigned int i = startPos; i < (startPos + window - 3); i++){ CircBuffer& buf = *myBuffer; binary a,b,c,d; a = buf[i];