Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
cabc6567
Commit
cabc6567
authored
Dec 28, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP: use vlc_strerror_c()
parent
cfc2e718
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
modules/access/rtp/input.c
modules/access/rtp/input.c
+3
-1
modules/access/rtp/rtp.c
modules/access/rtp/rtp.c
+4
-4
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+8
-7
No files found.
modules/access/rtp/input.c
View file @
cabc6567
...
...
@@ -30,6 +30,7 @@
#include <vlc_network.h>
#include <limits.h>
#include <errno.h>
#include <unistd.h>
#ifdef HAVE_POLL
# include <poll.h>
...
...
@@ -136,7 +137,8 @@ void *rtp_dgram_thread (void *opaque)
}
else
{
msg_Warn
(
demux
,
"RTP network error: %m"
);
msg_Warn
(
demux
,
"RTP network error: %s"
,
vlc_strerror_c
(
errno
));
block_Release
(
block
);
}
}
...
...
modules/access/rtp/rtp.c
View file @
cabc6567
...
...
@@ -26,7 +26,6 @@
#endif
#include <stdarg.h>
#include <assert.h>
#include <errno.h>
#include <vlc_common.h>
#include <vlc_demux.h>
...
...
@@ -290,12 +289,13 @@ static int Open (vlc_object_t *obj)
}
char
*
salt
=
var_CreateGetNonEmptyString
(
demux
,
"srtp-salt"
);
errno
=
srtp_setkeystring
(
p_sys
->
srtp
,
key
,
salt
?
salt
:
""
);
int
val
=
srtp_setkeystring
(
p_sys
->
srtp
,
key
,
salt
?
salt
:
""
);
free
(
salt
);
free
(
key
);
if
(
errno
)
if
(
val
)
{
msg_Err
(
obj
,
"bad SRTP key/salt combination (%m)"
);
msg_Err
(
obj
,
"bad SRTP key/salt combination (%s)"
,
vlc_strerror_c
(
val
));
goto
error
;
}
}
...
...
modules/stream_out/rtp.c
View file @
cabc6567
...
...
@@ -1039,12 +1039,13 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
}
char
*
salt
=
var_GetNonEmptyString
(
p_stream
,
SOUT_CFG_PREFIX
"salt"
);
errno
=
srtp_setkeystring
(
id
->
srtp
,
key
,
salt
?
salt
:
""
);
int
val
=
srtp_setkeystring
(
id
->
srtp
,
key
,
salt
?
salt
:
""
);
free
(
salt
);
free
(
key
);
if
(
errno
)
if
(
val
)
{
msg_Err
(
p_stream
,
"bad SRTP key/salt combination (%m)"
);
msg_Err
(
p_stream
,
"bad SRTP key/salt combination (%s)"
,
vlc_strerror_c
(
val
));
goto
error
;
}
id
->
i_sequence
=
0
;
/* FIXME: awful hack for libvlc_srtp */
...
...
@@ -1329,8 +1330,8 @@ static int FileSetup( sout_stream_t *p_stream )
if
(
(
f
=
vlc_fopen
(
p_sys
->
psz_sdp_file
,
"wt"
)
)
==
NULL
)
{
msg_Err
(
p_stream
,
"cannot open file '%s' (%
m
)"
,
p_sys
->
psz_sdp_file
);
msg_Err
(
p_stream
,
"cannot open file '%s' (%
s
)"
,
p_sys
->
psz_sdp_file
,
vlc_strerror_c
(
errno
)
);
return
VLC_EGENERIC
;
}
...
...
@@ -1421,8 +1422,8 @@ static void* ThreadSend( void *data )
vlc_restorecancel
(
canc
);
if
(
val
)
{
errno
=
val
;
msg_Dbg
(
id
->
p_stream
,
"SRTP sending error: %m"
);
msg_Dbg
(
id
->
p_stream
,
"SRTP sending error: %s"
,
vlc_strerror_c
(
val
)
);
block_Release
(
out
);
out
=
NULL
;
}
...
...
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