Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c037e794
Commit
c037e794
authored
Jun 20, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sap: remove useless string
parent
420977bc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
src/stream_output/sap.c
src/stream_output/sap.c
+5
-9
No files found.
src/stream_output/sap.c
View file @
c037e794
...
...
@@ -49,7 +49,6 @@ struct session_descriptor_t
struct
sockaddr_storage
addr
;
socklen_t
addrlen
;
char
*
psz_sdp
;
bool
b_ssm
;
};
...
...
@@ -210,7 +209,8 @@ static void *RunThread (void *self)
/**
* Add a SAP announce
*/
static
int
SAP_Add
(
sap_handler_t
*
p_sap
,
session_descriptor_t
*
p_session
)
static
int
SAP_Add
(
sap_handler_t
*
p_sap
,
session_descriptor_t
*
p_session
,
const
char
*
sdp
)
{
int
i
;
char
psz_addr
[
NI_MAXNUMERICHOST
];
...
...
@@ -347,7 +347,7 @@ static int SAP_Add (sap_handler_t *p_sap, session_descriptor_t *p_session)
}
/* XXX: Check for dupes */
length
=
headsize
+
strlen
(
p_session
->
psz_
sdp
);
length
=
headsize
+
strlen
(
sdp
);
p_sap_session
=
malloc
(
sizeof
(
*
p_sap_session
)
+
length
+
1
);
if
(
p_sap_session
==
NULL
)
{
...
...
@@ -399,7 +399,7 @@ static int SAP_Add (sap_handler_t *p_sap, session_descriptor_t *p_session)
headsize
+=
16
;
/* Build the final message */
strcpy
(
(
char
*
)
psz_head
+
headsize
,
p_session
->
psz_
sdp
);
strcpy
(
(
char
*
)
psz_head
+
headsize
,
sdp
);
sap_addr
->
session_count
++
;
vlc_cond_signal
(
&
sap_addr
->
wait
);
...
...
@@ -488,8 +488,6 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
if
(
!
p_session
)
return
NULL
;
p_session
->
psz_sdp
=
strdup
(
psz_sdp
);
/* GRUIK. We should not convert back-and-forth from string to numbers */
struct
addrinfo
*
res
;
if
(
vlc_getaddrinfo
(
psz_dst
,
0
,
NULL
,
&
res
)
==
0
)
...
...
@@ -516,7 +514,7 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
goto
error
;
msg_Dbg
(
obj
,
"adding SAP session"
);
if
(
SAP_Add
(
p_sap
,
p_session
))
if
(
SAP_Add
(
p_sap
,
p_session
,
psz_sdp
))
{
vlc_mutex_lock
(
&
sap_mutex
);
vlc_object_release
((
vlc_object_t
*
)
p_sap
);
...
...
@@ -527,7 +525,6 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
return
p_session
;
error:
free
(
p_session
->
psz_sdp
);
free
(
p_session
);
return
NULL
;
}
...
...
@@ -552,7 +549,6 @@ int sout_AnnounceUnRegister( vlc_object_t *obj,
vlc_object_release
((
vlc_object_t
*
)
p_sap
);
vlc_mutex_unlock
(
&
sap_mutex
);
free
(
p_session
->
psz_sdp
);
free
(
p_session
);
return
0
;
...
...
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