avoid crash when decode WebP network stream