fix writing buffer offset.

pps.length is writing to a incorrect offset. this may cause "nal size exceeds" with ffmpeg.