Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c112fae6
Commit
c112fae6
authored
Feb 14, 2020
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/libsrt: poll for error conditions as well
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
aab9133d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
libsrt.c
libavformat/libsrt.c
+6
-5
No files found.
libavformat/libsrt.c
View file @
c112fae6
...
...
@@ -164,16 +164,17 @@ static int libsrt_socket_nonblock(int socket, int enable)
static
int
libsrt_network_wait_fd
(
URLContext
*
h
,
int
eid
,
int
fd
,
int
write
)
{
int
ret
,
len
=
1
;
int
modes
=
write
?
SRT_EPOLL_OUT
:
SRT_EPOLL_IN
;
int
ret
,
len
=
1
,
errlen
=
1
;
int
modes
=
SRT_EPOLL_ERR
|
(
write
?
SRT_EPOLL_OUT
:
SRT_EPOLL_IN
)
;
SRTSOCKET
ready
[
1
];
SRTSOCKET
error
[
1
];
if
(
srt_epoll_add_usock
(
eid
,
fd
,
&
modes
)
<
0
)
return
libsrt_neterrno
(
h
);
if
(
write
)
{
ret
=
srt_epoll_wait
(
eid
,
0
,
0
,
ready
,
&
len
,
POLLING_TIME
,
0
,
0
,
0
,
0
);
ret
=
srt_epoll_wait
(
eid
,
error
,
&
errlen
,
ready
,
&
len
,
POLLING_TIME
,
0
,
0
,
0
,
0
);
}
else
{
ret
=
srt_epoll_wait
(
eid
,
ready
,
&
len
,
0
,
0
,
POLLING_TIME
,
0
,
0
,
0
,
0
);
ret
=
srt_epoll_wait
(
eid
,
ready
,
&
len
,
error
,
&
errlen
,
POLLING_TIME
,
0
,
0
,
0
,
0
);
}
if
(
ret
<
0
)
{
if
(
srt_getlasterror
(
NULL
)
==
SRT_ETIMEOUT
)
...
...
@@ -181,7 +182,7 @@ static int libsrt_network_wait_fd(URLContext *h, int eid, int fd, int write)
else
ret
=
libsrt_neterrno
(
h
);
}
else
{
ret
=
0
;
ret
=
errlen
?
AVERROR
(
EIO
)
:
0
;
}
if
(
srt_epoll_remove_usock
(
eid
,
fd
)
<
0
)
return
libsrt_neterrno
(
h
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment