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
f218121a
Commit
f218121a
authored
Jun 01, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: use ffurl_closep()
Fixes Ticket1383 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
edf96d63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
http.c
libavformat/http.c
+10
-8
No files found.
libavformat/http.c
View file @
f218121a
...
...
@@ -163,7 +163,8 @@ static int http_open_cnx(URLContext *h)
if
(
s
->
http_code
==
401
)
{
if
((
cur_auth_type
==
HTTP_AUTH_NONE
||
s
->
auth_state
.
stale
)
&&
s
->
auth_state
.
auth_type
!=
HTTP_AUTH_NONE
&&
attempts
<
4
)
{
ffurl_close
(
hd
);
ffurl_closep
(
&
hd
);
s
->
hd
=
NULL
;
goto
redo
;
}
else
goto
fail
;
...
...
@@ -171,7 +172,8 @@ static int http_open_cnx(URLContext *h)
if
(
s
->
http_code
==
407
)
{
if
((
cur_proxy_auth_type
==
HTTP_AUTH_NONE
||
s
->
proxy_auth_state
.
stale
)
&&
s
->
proxy_auth_state
.
auth_type
!=
HTTP_AUTH_NONE
&&
attempts
<
4
)
{
ffurl_close
(
hd
);
ffurl_closep
(
&
hd
);
s
->
hd
=
NULL
;
goto
redo
;
}
else
goto
fail
;
...
...
@@ -179,7 +181,8 @@ static int http_open_cnx(URLContext *h)
if
((
s
->
http_code
==
301
||
s
->
http_code
==
302
||
s
->
http_code
==
303
||
s
->
http_code
==
307
)
&&
location_changed
==
1
)
{
/* url moved, get next */
ffurl_close
(
hd
);
ffurl_closep
(
&
hd
);
s
->
hd
=
NULL
;
if
(
redirects
++
>=
MAX_REDIRECTS
)
return
AVERROR
(
EIO
);
/* Restart the authentication process with the new target, which
...
...
@@ -192,7 +195,7 @@ static int http_open_cnx(URLContext *h)
return
0
;
fail:
if
(
hd
)
ffurl_close
(
hd
);
ffurl_close
p
(
&
hd
);
s
->
hd
=
NULL
;
return
AVERROR
(
EIO
);
}
...
...
@@ -602,7 +605,7 @@ static int http_close(URLContext *h)
}
if
(
s
->
hd
)
ffurl_close
(
s
->
hd
);
ffurl_close
p
(
&
s
->
hd
);
return
ret
;
}
...
...
@@ -684,7 +687,7 @@ static int http_proxy_close(URLContext *h)
{
HTTPContext
*
s
=
h
->
priv_data
;
if
(
s
->
hd
)
ffurl_close
(
s
->
hd
);
ffurl_close
p
(
&
s
->
hd
);
return
0
;
}
...
...
@@ -755,8 +758,7 @@ redo:
if
(
s
->
http_code
==
407
&&
(
cur_auth_type
==
HTTP_AUTH_NONE
||
s
->
proxy_auth_state
.
stale
)
&&
s
->
proxy_auth_state
.
auth_type
!=
HTTP_AUTH_NONE
&&
attempts
<
2
)
{
ffurl_close
(
s
->
hd
);
s
->
hd
=
NULL
;
ffurl_closep
(
&
s
->
hd
);
goto
redo
;
}
...
...
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