Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
8eff8faa
Commit
8eff8faa
authored
Feb 14, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/media_discoverer.c: Small lock issues.
parent
392b19b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/control/media_discoverer.c
src/control/media_discoverer.c
+8
-4
No files found.
src/control/media_discoverer.c
View file @
8eff8faa
...
@@ -51,7 +51,9 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
...
@@ -51,7 +51,9 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
* that category in a media_list. */
* that category in a media_list. */
if
(
psz_cat
)
if
(
psz_cat
)
{
{
p_mlist
=
kVLCDictionaryNotFound
;
p_mlist
=
vlc_dictionary_value_for_key
(
&
p_mdis
->
catname_to_submedialist
,
psz_cat
);
p_mlist
=
vlc_dictionary_value_for_key
(
&
p_mdis
->
catname_to_submedialist
,
psz_cat
);
if
(
p_mlist
==
kVLCDictionaryNotFound
)
if
(
p_mlist
==
kVLCDictionaryNotFound
)
{
{
libvlc_media_descriptor_t
*
p_catmd
;
libvlc_media_descriptor_t
*
p_catmd
;
...
@@ -60,10 +62,12 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
...
@@ -60,10 +62,12 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
p_mlist
->
b_read_only
=
VLC_TRUE
;
p_mlist
->
b_read_only
=
VLC_TRUE
;
/* Insert the newly created mlist in our dictionary */
/* Insert the newly created mlist in our dictionary */
vlc_dictionary_insert
(
&
p_mdis
->
catname_to_submedialist
,
psz_cat
,
p_mlist
);
__vlc_dictionary_insert
(
&
p_mdis
->
catname_to_submedialist
,
psz_cat
,
p_mlist
,
0
);
/* Insert the md into the root list */
/* Insert the md into the root list */
libvlc_media_list_lock
(
p_mdis
->
p_mlist
);
_libvlc_media_list_add_media_descriptor
(
p_mdis
->
p_mlist
,
p_catmd
,
NULL
);
_libvlc_media_list_add_media_descriptor
(
p_mdis
->
p_mlist
,
p_catmd
,
NULL
);
libvlc_media_list_unlock
(
p_mdis
->
p_mlist
);
/* We don't release the mlist cause the dictionary
/* We don't release the mlist cause the dictionary
* doesn't retain the object. But we release the md. */
* doesn't retain the object. But we release the md. */
...
@@ -71,9 +75,9 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
...
@@ -71,9 +75,9 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
}
}
}
}
libvlc_media_list_lock
(
p_m
dis
->
p_m
list
);
libvlc_media_list_lock
(
p_mlist
);
_libvlc_media_list_add_media_descriptor
(
p_mlist
,
p_md
,
NULL
);
_libvlc_media_list_add_media_descriptor
(
p_mlist
,
p_md
,
NULL
);
libvlc_media_list_unlock
(
p_m
dis
->
p_m
list
);
libvlc_media_list_unlock
(
p_mlist
);
}
}
/**************************************************************************
/**************************************************************************
...
...
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