intbitrate=*((int*)arg);// the argument is the network bitrate requested
/* this function also manage the ptime, check if we are increasing or decreasing the bitrate in order to possibly decrease or increase ptime */
if(d->bitrate>0&&d->ptime>0){/* at first call to set_bitrate(bitrate is initialised at -1), do not modify ptime, neither if it wasn't initialised too */