Open GoogleCodeExporter opened 9 years ago
[deleted comment]
[deleted comment]
Thanks for reporting the bug.
It may be a common problem for Ubuntu 11.10.
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/879018
You can add one-line code in sock_bind function
static void sock_bind(int sock){
struct sockaddr_in local_addr;
socklen_t length;
memset(&local_addr,0,sizeof(local_addr));
local_addr.sin_port = ntohs(SERVER_PORT);
local_addr.sin_family= AF_INET; //add this line for Ubuntu 11.10
length = (socklen_t)(sizeof(local_addr));
if(bind(sock,(struct sockaddr *)&local_addr,length)==-1){
perror("can not bind:");
logInfo(LOG_ERR,"it can not bind address");
exit(errno);
}else
{
logInfo(LOG_NOTICE,"it binds address successfully");
}
}
Check if it is working.
Thanks again
Original comment by 163.beij...@gmail.com
on 7 May 2012 at 12:42
Original issue reported on code.google.com by
gvvictor...@gmail.com
on 4 May 2012 at 5:51