Commit 7fff679f authored by Ilkka Ollakka's avatar Ilkka Ollakka
Browse files

udp: don't realloc in receiving, just set i_buffer

Similar than rtp input does, doing realloc from 64k->1.5k would
usually mean extra malloc+memcpy per packet.

Also don't pass buffer onward if we don't receive any useful stuff (-1)
parent e68826bd
......@@ -264,10 +264,10 @@ static void* ThreadRead( void *data )
if( errno == EINTR )
} else {
pkt->i_buffer = len;
block_FifoPut( sys->fifo, pkt );
pkt = block_Realloc( pkt, 0, len );
block_FifoPut( sys->fifo, pkt );
block_FifoWake( sys->fifo );
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment