streaming: Update the buf pointer when doing partial writes.

This fixes commit 72070d1ba15a45ce06519074846a612b97a4e54f.