mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-25 04:11:38 +00:00
networking, multicast: In linux, bind to the specific IP address of the multicast source.
OCR: init some variables that didn't have a default value.
This commit is contained in:
parent
ec9a0985ce
commit
51537e8725
@ -977,7 +977,15 @@ int start_upd_srv(const char *addr_str, unsigned port)
|
||||
struct sockaddr_in servaddr;
|
||||
servaddr.sin_family = AF_INET;
|
||||
servaddr.sin_port = htons(port);
|
||||
#if _WIN32
|
||||
// Doesn't seem correct, if there's more than one multicast stream with the same
|
||||
// port number we get corruption - IP address needs to be specified, but
|
||||
// in Windows we get an error 10049 (cannot bind).
|
||||
// http ://stackoverflow.com/questions/6140734/cannot-bind-to-multicast-address-windows
|
||||
servaddr.sin_addr.s_addr = htonl(IN_MULTICAST(addr) ? INADDR_ANY : addr);
|
||||
#else
|
||||
servaddr.sin_addr.s_addr = htonl(addr);
|
||||
#endif
|
||||
|
||||
if (bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) != 0)
|
||||
{
|
||||
|
@ -161,7 +161,7 @@ fail:
|
||||
|
||||
BOX* ignore_alpha_at_edge(png_byte *alpha, unsigned char* indata, int w, int h, PIX *in, PIX **out)
|
||||
{
|
||||
int i, j, index, start_y, end_y;
|
||||
int i, j, index, start_y=0, end_y=0;
|
||||
int find_end_x = CCX_FALSE;
|
||||
BOX* cropWindow;
|
||||
for (j = 1; j < w-1; j++)
|
||||
|
Loading…
Reference in New Issue
Block a user