Use CTAPacket instead of ByteStreamPtr on CTAStream::writePacket().