aboutsummaryrefslogtreecommitdiffstats
path: root/ffserver.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2007-02-22 12:17:25 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2007-02-22 12:17:25 +0000
commitd96633bbe4d6835c89deea41ea54846246e74d89 (patch)
treee506b82a1d68054de6bb109b65b779eaf38f491f /ffserver.c
parentdb0ed93e228d79763a40d61b0fd21a8a93dc674f (diff)
downloadffmpeg-d96633bbe4d6835c89deea41ea54846246e74d89.tar.gz
change close() to closesocket() on sockets (compatible with libavformat)
Originally committed as revision 8068 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffserver.c b/ffserver.c
index 01374130af..8b1e5af408 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -436,13 +436,13 @@ static int socket_open_listen(struct sockaddr_in *my_addr)
char bindmsg[32];
snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", ntohs(my_addr->sin_port));
perror (bindmsg);
- close(server_fd);
+ closesocket(server_fd);
return -1;
}
if (listen (server_fd, 5) < 0) {
perror ("listen");
- close(server_fd);
+ closesocket(server_fd);
return -1;
}
fcntl(server_fd, F_SETFL, O_NONBLOCK);
@@ -686,7 +686,7 @@ static void new_connection(int server_fd, int is_rtsp)
av_free(c->buffer);
av_free(c);
}
- close(fd);
+ closesocket(fd);
}
static void close_connection(HTTPContext *c)
@@ -716,7 +716,7 @@ static void close_connection(HTTPContext *c)
/* remove connection associated resources */
if (c->fd >= 0)
- close(c->fd);
+ closesocket(c->fd);
if (c->fmt_in) {
/* close each frame parser */
for(i=0;i<c->fmt_in->nb_streams;i++) {