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
abcabca6
Commit
abcabca6
authored
Dec 20, 2000
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
. now we only try to open plugins which are existing files
parent
50118171
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
INSTALL
INSTALL
+1
-1
src/misc/plugins.c
src/misc/plugins.c
+16
-5
No files found.
INSTALL
View file @
abcabca6
...
...
@@ -11,7 +11,7 @@ A typical way to configure the vlc is :
For a full compilation, you may try :
./configure --prefix=/usr --enable-mmx --enable-gnome --enable-fb \
--enable-glide --enable-ggi --enable-
mga
--enable-esd --enable-alsa
--enable-glide --enable-ggi --enable-
sdl
--enable-esd --enable-alsa
See `./configure --help' for more information.
...
...
src/misc/plugins.c
View file @
abcabca6
...
...
@@ -27,6 +27,10 @@
#include <stdio.h>
/* sprintf() */
#include <string.h>
/* strerror() */
#include <errno.h>
/* ENOMEM */
#include <sys/types.h>
/* open */
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/* close */
#if defined(HAVE_DLFCN_H)
/* Linux, BSD, Hurd */
#include <dlfcn.h>
/* dlopen(), dlsym(), dlclose() */
...
...
@@ -135,7 +139,7 @@ void bank_Destroy( plugin_bank_t * p_bank )
char
*
TestPlugin
(
plugin_id_t
*
p_plugin_id
,
char
*
psz_name
)
{
int
i_count
,
i_length
;
int
i_count
,
i_length
,
i_fd
;
char
*
psz_plugin
;
char
*
psz_plugin_path
[
]
=
{
...
...
@@ -163,6 +167,15 @@ char * TestPlugin ( plugin_id_t *p_plugin_id, char * psz_name )
psz_plugin
=
malloc
(
strlen
(
psz_plugin_path
[
i_count
])
+
i_length
+
5
);
sprintf
(
psz_plugin
,
"%s/%s.so"
,
psz_plugin_path
[
i_count
],
psz_name
);
/* Try to open the plugin before dlopen()ing it. */
i_fd
=
open
(
psz_plugin
,
O_RDONLY
);
if
(
i_fd
==
-
1
)
{
free
(
psz_plugin
);
continue
;
}
close
(
i_fd
);
*
p_plugin_id
=
dlopen
(
psz_plugin
,
RTLD_NOW
|
RTLD_GLOBAL
);
#endif
...
...
@@ -175,11 +188,9 @@ char * TestPlugin ( plugin_id_t *p_plugin_id, char * psz_name )
/* plugin successfuly dlopened */
return
(
psz_plugin
);
}
#ifndef SYS_BEOS
else
{
intf_WarnMsg
(
1
,
"dlerror: %s
\n
"
,
dlerror
()
);
}
intf_WarnMsg
(
1
,
"Plugin %s failed: %s
\n
"
,
psz_plugin
,
dlerror
()
);
#endif
free
(
psz_plugin
);
...
...
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