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
d84f9e30
Commit
d84f9e30
authored
Jul 22, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sap: Don't use the playlist.
This should fix a crash reported by ivoire.
parent
7a2cfda9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+9
-19
No files found.
modules/services_discovery/sap.c
View file @
d84f9e30
...
...
@@ -34,8 +34,8 @@
#include <vlc_plugin.h>
#include <assert.h>
#include <vlc_playlist.h>
#include <vlc_demux.h>
#include <vlc_services_discovery.h>
#include <vlc_network.h>
#include <vlc_charset.h>
...
...
@@ -227,7 +227,7 @@ struct sap_announce_t
/* SAP annnounces must only contain one SDP */
sdp_t
*
p_sdp
;
in
t
i_input_id
;
in
put_item_t
*
p_item
;
};
struct
services_discovery_sys_t
...
...
@@ -662,7 +662,6 @@ static int Demux( demux_t *p_demux )
input_thread_t
*
p_input
;
input_item_t
*
p_parent_input
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_demux
);
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
assert
(
p_input
);
...
...
@@ -681,17 +680,8 @@ static int Demux( demux_t *p_demux )
p_parent_input
->
i_type
=
ITEM_TYPE_NET
;
if
(
p_playlist
->
status
.
p_item
&&
p_playlist
->
status
.
p_item
->
p_input
==
p_parent_input
)
{
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
pl_Locked
,
p_playlist
->
status
.
p_node
,
p_playlist
->
status
.
p_item
);
}
vlc_mutex_unlock
(
&
p_parent_input
->
lock
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
return
VLC_SUCCESS
;
}
...
...
@@ -880,12 +870,12 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
p_sap
->
i_hash
=
i_hash
;
p_sap
->
p_sdp
=
p_sdp
;
/*
Create the actual playlist item her
e */
/*
Released in RemoveAnnounc
e */
p_input
=
input_ItemNewWithType
(
VLC_OBJECT
(
p_sd
),
p_sap
->
p_sdp
->
psz_uri
,
p_sdp
->
psz_sessionname
,
0
,
NULL
,
-
1
,
ITEM_TYPE_NET
);
p_sap
->
i_input_id
=
p_input
->
i_id
;
p_sap
->
p_item
=
p_input
;
if
(
!
p_input
)
{
free
(
p_sap
);
...
...
@@ -915,7 +905,7 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
services_discovery_AddItem
(
p_sd
,
p_input
,
psz_value
/* category name */
);
TAB_APPEND
(
p_sys
->
i_announces
,
p_sys
->
pp_announces
,
p_sap
);
vlc_gc_decref
(
p_input
);
return
p_sap
;
}
...
...
@@ -1537,11 +1527,11 @@ static int RemoveAnnounce( services_discovery_t *p_sd,
p_announce
->
p_sdp
=
NULL
;
}
if
(
p_announce
->
i_input_id
>
-
1
)
if
(
p_announce
->
p_item
)
{
playlist_DeleteFromInput
(
pl_Yield
(
p_sd
),
p_announce
->
i_input_id
,
pl_Unlocked
);
p
l_Release
(
p_sd
)
;
services_discovery_RemoveItem
(
p_sd
,
p_announce
->
p_item
);
vlc_gc_decref
(
p_announce
->
p_item
);
p
_announce
->
p_item
=
NULL
;
}
for
(
i
=
0
;
i
<
p_sd
->
p_sys
->
i_announces
;
i
++
)
...
...
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