Fix read next packet

Improve extracting process from InputFile
`@warning It will clear the buffering of all InputStream.`