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
2f96cc1f
Commit
2f96cc1f
authored
Mar 12, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtsp: Retry authentication if failed due to being stale
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
8a3360d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
rtsp.c
libavformat/rtsp.c
+5
-3
No files found.
libavformat/rtsp.c
View file @
2f96cc1f
...
...
@@ -1122,7 +1122,7 @@ int ff_rtsp_send_cmd_with_content(AVFormatContext *s,
{
RTSPState
*
rt
=
s
->
priv_data
;
HTTPAuthType
cur_auth_type
;
int
ret
;
int
ret
,
attempts
=
0
;
retry:
cur_auth_type
=
rt
->
auth_state
.
auth_type
;
...
...
@@ -1133,9 +1133,11 @@ retry:
if
((
ret
=
ff_rtsp_read_reply
(
s
,
reply
,
content_ptr
,
0
,
method
)
)
<
0
)
return
ret
;
attempts
++
;
if
(
reply
->
status_code
==
401
&&
cur_auth_type
==
HTTP_AUTH_NONE
&&
rt
->
auth_state
.
auth_type
!=
HTTP_AUTH_NONE
)
if
(
reply
->
status_code
==
401
&&
(
cur_auth_type
==
HTTP_AUTH_NONE
||
rt
->
auth_state
.
stale
)
&&
rt
->
auth_state
.
auth_type
!=
HTTP_AUTH_NONE
&&
attempts
<
2
)
goto
retry
;
if
(
reply
->
status_code
>
400
){
...
...
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