Increase receive buffer of the RTP socket because in case of high fps video, some packets could overflow the buffer (especially on Windows which has low receive buffer by default), which means that some packets will be dropped.

cusax-fix
Sebastien Vincent 16 years ago
parent 58787d1330
commit b807ffabad

@ -86,6 +86,14 @@ public RTPConnectorInputStream(DatagramSocket socket)
{
this.socket = socket;
try
{
this.socket.setReceiveBufferSize(65535);
}
catch(IOException e)
{
}
closed = false;
receiverThread = new Thread(this);
receiverThread.start();

@ -263,6 +263,7 @@ public synchronized int process(Buffer inBuffer, Buffer outBuffer)
// Ask FFmpeg to decode.
got_picture[0] = false;
// TODO Take into account the offset of inputBuffer.
FFmpeg.avcodec_decode_video(
avcontext,

Loading…
Cancel
Save