return;
}
//else
byte[] buffer=new byte[BUFFER_SIZE];
UdpPacket udp_packet=new UdpPacket(buffer,0);
if (DEBUG) println("Reading blocks of max "+buffer.length+" bytes");
//byte[] aux=new byte[BUFFER_SIZE];
running=true;
try
{ udp_socket.setSoTimeout(SO_TIMEOUT);
while (running)
{ try
{ // read a block of data from the rtp socket
udp_socket.receive(udp_packet);
//if (DEBUG) System.out.print(".");
// write this block to the output_stream (only if still running..)
if (running) output_stream.write(udp_packet.getData(), udp_packet.getOffset(), udp_packet.getLength());
}
catch (java.io.InterruptedIOException e) { }
}
}
catch (Exception e) { running=false; e.printStackTrace(); }