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
a87063e3
Commit
a87063e3
authored
Feb 11, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SAP parser (again)
parent
65f5f148
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
17 deletions
+9
-17
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+9
-17
No files found.
modules/services_discovery/sap.c
View file @
a87063e3
...
...
@@ -393,11 +393,6 @@ static int OpenDemux( vlc_object_t *p_this )
goto
error
;
}
if
(
p_sdp
->
mediac
>
1
)
{
goto
error
;
}
if
(
ParseConnection
(
VLC_OBJECT
(
p_demux
),
p_sdp
)
)
{
p_sdp
->
psz_uri
=
NULL
;
...
...
@@ -706,25 +701,22 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
p_sdp
=
ParseSDP
(
VLC_OBJECT
(
p_sd
),
psz_sdp
);
if
(
p_sdp
==
NULL
)
{
return
VLC_EGENERIC
;
}
/* Decide whether we should add a playlist item for this SDP */
/* Parse connection information (c= & m= ) */
if
(
ParseConnection
(
VLC_OBJECT
(
p_sd
),
p_sdp
)
)
{
p_sdp
->
psz_uri
=
NULL
;
}
/* Multi-media or no-parse -> pass to LIVE.COM */
if
(
p_sdp
->
mediac
>
1
||
(
p_sdp
->
i_media_type
!=
14
&&
p_sdp
->
i_media_type
!=
32
&&
p_sdp
->
i_media_type
!=
33
)
||
p_sd
->
p_sys
->
b_parse
==
VLC_FALSE
)
if
(
(
p_sdp
->
i_media_type
!=
14
&&
p_sdp
->
i_media_type
!=
32
&&
p_sdp
->
i_media_type
!=
33
)
||
p_sd
->
p_sys
->
b_parse
==
VLC_FALSE
)
{
if
(
p_sdp
->
psz_uri
)
free
(
p_sdp
->
psz_uri
);
asprintf
(
&
p_sdp
->
psz_uri
,
"sdp://%s"
,
p_sdp
->
psz_sdp
);
free
(
p_sdp
->
psz_uri
);
if
(
asprintf
(
&
p_sdp
->
psz_uri
,
"sdp://%s"
,
p_sdp
->
psz_sdp
)
==
-
1
)
p_sdp
->
psz_uri
=
NULL
;
}
if
(
p_sdp
->
psz_uri
==
NULL
)
return
VLC_EGENERIC
;
...
...
@@ -1186,7 +1178,7 @@ static sdp_t *ParseSDP (vlc_object_t *p_obj, const char *psz_sdp)
msg_Dbg
(
p_obj
,
"missing SDP media port"
);
goto
error
;
}
int
port
=
atoi
(
data
);
int
port
=
atoi
(
++
data
);
if
(
port
<=
0
||
port
>=
65536
)
{
msg_Dbg
(
p_obj
,
"invalid transport port %d"
,
port
);
...
...
@@ -1200,7 +1192,7 @@ static sdp_t *ParseSDP (vlc_object_t *p_obj, const char *psz_sdp)
msg_Dbg
(
p_obj
,
"missing SDP media format"
);
goto
error
;
}
m
->
fmt
=
strdup
(
data
);
m
->
fmt
=
strdup
(
++
data
);
if
(
m
->
fmt
==
NULL
)
goto
error
;
...
...
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