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
c11e8245
Commit
c11e8245
authored
Jan 28, 2010
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extensions/Qt: use lock on extensions list
parent
9f49f111
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
modules/gui/qt4/extensions_manager.cpp
modules/gui/qt4/extensions_manager.cpp
+8
-0
No files found.
modules/gui/qt4/extensions_manager.cpp
View file @
c11e8245
...
...
@@ -119,6 +119,8 @@ void ExtensionsManager::menu( QMenu *current )
action
->
setEnabled
(
false
);
current
->
addSeparator
();
vlc_mutex_lock
(
&
p_extensions_manager
->
lock
);
extension_t
*
p_ext
=
NULL
;
int
i_ext
=
0
;
FOREACH_ARRAY
(
p_ext
,
p_extensions_manager
->
extensions
)
...
...
@@ -183,6 +185,8 @@ void ExtensionsManager::menu( QMenu *current )
}
FOREACH_END
()
vlc_mutex_unlock
(
&
p_extensions_manager
->
lock
);
/* Possibility to unload the module */
current
->
addSeparator
();
current
->
addAction
(
QIcon
(
":/menu/quit"
),
qtr
(
"Unload extensions"
),
...
...
@@ -194,6 +198,8 @@ void ExtensionsManager::triggerMenu( int id )
uint16_t
i_ext
=
MENU_GET_EXTENSION
(
id
);
uint16_t
i_action
=
MENU_GET_ACTION
(
id
);
vlc_mutex_lock
(
&
p_extensions_manager
->
lock
);
if
(
(
int
)
i_ext
>
p_extensions_manager
->
extensions
.
i_size
)
{
msg_Dbg
(
p_intf
,
"can't trigger extension with wrong id %d"
,
...
...
@@ -204,6 +210,8 @@ void ExtensionsManager::triggerMenu( int id )
extension_t
*
p_ext
=
ARRAY_VAL
(
p_extensions_manager
->
extensions
,
i_ext
);
assert
(
p_ext
!=
NULL
);
vlc_mutex_unlock
(
&
p_extensions_manager
->
lock
);
if
(
i_action
==
0
)
{
msg_Dbg
(
p_intf
,
"activating or triggering extension '%s'"
,
...
...
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