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
de3972b9
Commit
de3972b9
authored
Oct 21, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
af5759ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
28 deletions
+17
-28
src/misc/modules.c
src/misc/modules.c
+17
-28
No files found.
src/misc/modules.c
View file @
de3972b9
...
@@ -752,21 +752,22 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
...
@@ -752,21 +752,22 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
{
{
/* Yes, there are two NULLs because we replace one with "plugin-path". */
/* Yes, there are two NULLs because we replace one with "plugin-path". */
#if defined( WIN32 ) || defined( UNDER_CE )
#if defined( WIN32 ) || defined( UNDER_CE )
c
har
*
path
[]
=
{
"modules"
,
""
,
"plugins"
,
0
,
0
};
c
onst
char
*
path
[]
=
{
"modules"
,
""
,
"plugins"
,
NULL
,
NULL
};
#else
#else
c
har
*
path
[]
=
{
"modules"
,
PLUGIN_PATH
,
"plugins"
,
0
,
0
};
c
onst
char
*
path
[]
=
{
"modules"
,
PLUGIN_PATH
,
"plugins"
,
NULL
,
NULL
};
#endif
#endif
char
**
ppsz_path
=
path
;
const
char
*
const
*
ppsz_path
;
char
*
psz_fullpath
;
/* If the user provided a plugin path, we add it to the list */
/* If the user provided a plugin path, we add it to the list */
path
[
sizeof
(
path
)
/
sizeof
(
char
*
)
-
2
]
=
char
*
userpath
=
config_GetPsz
(
p_this
,
"plugin-path"
);
config_GetPsz
(
p_this
,
"plugin-path"
)
;
path
[
sizeof
(
path
)
/
sizeof
(
path
[
0
])
-
2
]
=
userpath
;
for
(
;
*
ppsz_path
!=
NULL
;
ppsz_path
++
)
for
(
ppsz_path
=
path
;
*
ppsz_path
!=
NULL
;
ppsz_path
++
)
{
{
if
(
!
(
*
ppsz_path
)[
0
]
)
continue
;
char
*
psz_fullpath
;
if
(
!**
ppsz_path
)
continue
;
#if defined( SYS_BEOS ) || defined( __APPLE__ ) || defined( WIN32 )
#if defined( SYS_BEOS ) || defined( __APPLE__ ) || defined( WIN32 )
...
@@ -778,27 +779,16 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
...
@@ -778,27 +779,16 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
if
(
(
*
ppsz_path
)[
0
]
!=
'/'
)
if
(
(
*
ppsz_path
)[
0
]
!=
'/'
)
#endif
#endif
{
{
int
i_dirlen
=
strlen
(
*
ppsz_path
);
if
(
asprintf
(
&
psz_fullpath
,
"%s"
DIR_SEP
"%s"
,
i_dirlen
+=
strlen
(
p_this
->
p_libvlc_global
->
psz_vlcpath
)
+
2
;
p_this
->
p_libvlc_global
->
psz_vlcpath
,
*
ppsz_path
))
psz_fullpath
=
NULL
;
psz_fullpath
=
malloc
(
i_dirlen
);
if
(
psz_fullpath
==
NULL
)
{
continue
;
}
#ifdef WIN32
sprintf
(
psz_fullpath
,
"%s
\\
%s"
,
p_this
->
p_libvlc_global
->
psz_vlcpath
,
*
ppsz_path
);
#else
sprintf
(
psz_fullpath
,
"%s/%s"
,
p_this
->
p_libvlc_global
->
psz_vlcpath
,
*
ppsz_path
);
#endif
}
}
else
else
#endif
#endif
{
psz_fullpath
=
strdup
(
*
ppsz_path
);
psz_fullpath
=
strdup
(
*
ppsz_path
);
}
if
(
psz_fullpath
==
NULL
)
continue
;
msg_Dbg
(
p_this
,
"recursively browsing `%s'"
,
psz_fullpath
);
msg_Dbg
(
p_this
,
"recursively browsing `%s'"
,
psz_fullpath
);
...
@@ -809,9 +799,8 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
...
@@ -809,9 +799,8 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
}
}
/* Free plugin-path */
/* Free plugin-path */
if
(
path
[
sizeof
(
path
)
/
sizeof
(
char
*
)
-
2
]
)
if
(
userpath
!=
NULL
)
free
(
path
[
sizeof
(
path
)
/
sizeof
(
char
*
)
-
2
]
);
free
(
userpath
);
path
[
sizeof
(
path
)
/
sizeof
(
char
*
)
-
2
]
=
NULL
;
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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