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
98063bcf
Commit
98063bcf
authored
Nov 23, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtsp: Do not assume getnameinfo cannot fail
And properly report the error when it happens.
parent
5b70fb8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
rtsp.c
libavformat/rtsp.c
+8
-2
No files found.
libavformat/rtsp.c
View file @
98063bcf
...
...
@@ -2264,8 +2264,14 @@ static int sdp_read_header(AVFormatContext *s)
if
(
!
(
rt
->
rtsp_flags
&
RTSP_FLAG_CUSTOM_IO
))
{
AVDictionary
*
opts
=
map_to_opts
(
rt
);
getnameinfo
((
struct
sockaddr
*
)
&
rtsp_st
->
sdp_ip
,
sizeof
(
rtsp_st
->
sdp_ip
),
namebuf
,
sizeof
(
namebuf
),
NULL
,
0
,
NI_NUMERICHOST
);
err
=
getnameinfo
((
struct
sockaddr
*
)
&
rtsp_st
->
sdp_ip
,
sizeof
(
rtsp_st
->
sdp_ip
),
namebuf
,
sizeof
(
namebuf
),
NULL
,
0
,
NI_NUMERICHOST
);
if
(
err
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"getnameinfo: %s
\n
"
,
gai_strerror
(
err
));
err
=
AVERROR
(
EIO
);
goto
fail
;
}
ff_url_join
(
url
,
sizeof
(
url
),
"rtp"
,
NULL
,
namebuf
,
rtsp_st
->
sdp_port
,
"?localport=%d&ttl=%d&connect=%d&write_to_source=%d"
,
...
...
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