ResetNextSubstream function

Reset the state of a stream