diff --git a/src/lib_ccx/networking.c b/src/lib_ccx/networking.c index 2e73d319..62950263 100644 --- a/src/lib_ccx/networking.c +++ b/src/lib_ccx/networking.c @@ -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) { diff --git a/src/lib_ccx/ocr.c b/src/lib_ccx/ocr.c index ebd76194..b71038f7 100644 --- a/src/lib_ccx/ocr.c +++ b/src/lib_ccx/ocr.c @@ -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++)