Commit b96bc946 authored by Marton Balint's avatar Marton Balint

avformat/libsrt: fix timeout unit confusion between milisec and microsec

Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 90913abc
...@@ -210,7 +210,7 @@ static int libsrt_network_wait_fd_timeout(URLContext *h, int eid, int fd, int wr ...@@ -210,7 +210,7 @@ static int libsrt_network_wait_fd_timeout(URLContext *h, int eid, int fd, int wr
} }
} }
static int libsrt_listen(int eid, int fd, const struct sockaddr *addr, socklen_t addrlen, URLContext *h, int timeout) static int libsrt_listen(int eid, int fd, const struct sockaddr *addr, socklen_t addrlen, URLContext *h, int64_t timeout)
{ {
int ret; int ret;
int reuse = 1; int reuse = 1;
...@@ -243,7 +243,7 @@ static int libsrt_listen(int eid, int fd, const struct sockaddr *addr, socklen_t ...@@ -243,7 +243,7 @@ static int libsrt_listen(int eid, int fd, const struct sockaddr *addr, socklen_t
return ret; return ret;
} }
static int libsrt_listen_connect(int eid, int fd, const struct sockaddr *addr, socklen_t addrlen, int timeout, URLContext *h, int will_try_next) static int libsrt_listen_connect(int eid, int fd, const struct sockaddr *addr, socklen_t addrlen, int64_t timeout, URLContext *h, int will_try_next)
{ {
int ret; int ret;
...@@ -447,7 +447,7 @@ static int libsrt_setup(URLContext *h, const char *uri, int flags) ...@@ -447,7 +447,7 @@ static int libsrt_setup(URLContext *h, const char *uri, int flags)
} }
if (s->mode == SRT_MODE_LISTENER) { if (s->mode == SRT_MODE_LISTENER) {
// multi-client // multi-client
if ((ret = libsrt_listen(s->eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen, h, open_timeout / 1000)) < 0) if ((ret = libsrt_listen(s->eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen, h, open_timeout)) < 0)
goto fail1; goto fail1;
fd = ret; fd = ret;
} else { } else {
...@@ -458,7 +458,7 @@ static int libsrt_setup(URLContext *h, const char *uri, int flags) ...@@ -458,7 +458,7 @@ static int libsrt_setup(URLContext *h, const char *uri, int flags)
} }
if ((ret = libsrt_listen_connect(s->eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen, if ((ret = libsrt_listen_connect(s->eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen,
open_timeout / 1000, h, !!cur_ai->ai_next)) < 0) { open_timeout, h, !!cur_ai->ai_next)) < 0) {
if (ret == AVERROR_EXIT) if (ret == AVERROR_EXIT)
goto fail1; goto fail1;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment