{
if (udp_socket==null || input_stream==null) return;
//else
byte[] buffer=new byte[frame_size];
UdpPacket udp_packet=new UdpPacket(buffer,0);
long time=0;
long start_time=System.currentTimeMillis();
long byte_rate=frame_rate*frame_size;
running=true;
if (DEBUG) println("Reading blocks of "+(buffer.length)+" bytes");
try
{ while (running)
{
//if (DEBUG) System.out.print("o");
int num=input_stream.read(buffer,12,buffer.length);
//if (DEBUG) System.out.print("*");
if (num>0)
{ udp_packet.setLength(num);
udp_socket.send(udp_packet);
// update rtp timestamp (in milliseconds)
time+=(num*1000)/byte_rate;
// wait fo next departure
if (do_sync)