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
5c6365af
Commit
5c6365af
authored
Apr 18, 2018
by
Hendrik Leppkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/tls_schannel: fix handling of EOF after avio changes
parent
638575cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
tls_schannel.c
libavformat/tls_schannel.c
+6
-4
No files found.
libavformat/tls_schannel.c
View file @
5c6365af
...
@@ -413,11 +413,13 @@ static int tls_read(URLContext *h, uint8_t *buf, int len)
...
@@ -413,11 +413,13 @@ static int tls_read(URLContext *h, uint8_t *buf, int len)
ret
=
ffurl_read
(
s
->
tcp
,
c
->
enc_buf
+
c
->
enc_buf_offset
,
ret
=
ffurl_read
(
s
->
tcp
,
c
->
enc_buf
+
c
->
enc_buf_offset
,
c
->
enc_buf_size
-
c
->
enc_buf_offset
);
c
->
enc_buf_size
-
c
->
enc_buf_offset
);
if
(
ret
<
0
)
{
if
(
ret
==
AVERROR_EOF
)
{
c
->
connection_closed
=
1
;
ret
=
0
;
}
else
if
(
ret
<
0
)
{
av_log
(
h
,
AV_LOG_ERROR
,
"Unable to read from socket
\n
"
);
av_log
(
h
,
AV_LOG_ERROR
,
"Unable to read from socket
\n
"
);
return
ret
;
return
ret
;
}
else
if
(
ret
==
0
)
}
c
->
connection_closed
=
1
;
c
->
enc_buf_offset
+=
ret
;
c
->
enc_buf_offset
+=
ret
;
}
}
...
@@ -515,7 +517,7 @@ cleanup:
...
@@ -515,7 +517,7 @@ cleanup:
if
(
ret
==
0
&&
!
c
->
connection_closed
)
if
(
ret
==
0
&&
!
c
->
connection_closed
)
ret
=
AVERROR
(
EAGAIN
);
ret
=
AVERROR
(
EAGAIN
);
return
ret
<
0
?
ret
:
0
;
return
ret
<
0
?
ret
:
AVERROR_EOF
;
}
}
static
int
tls_write
(
URLContext
*
h
,
const
uint8_t
*
buf
,
int
len
)
static
int
tls_write
(
URLContext
*
h
,
const
uint8_t
*
buf
,
int
len
)
...
...
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