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
cf825526
Commit
cf825526
authored
May 04, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Privatize psz_configfile
parent
26d208e5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
include/vlc_main.h
include/vlc_main.h
+0
-2
src/config/file.c
src/config/file.c
+3
-3
src/libvlc-common.c
src/libvlc-common.c
+2
-2
src/libvlc.h
src/libvlc.h
+2
-0
No files found.
include/vlc_main.h
View file @
cf825526
...
...
@@ -43,8 +43,6 @@ struct libvlc_int_t
char
*
psz_datadir
;
///< user's data directory
char
*
psz_cachedir
;
///< user's cache directory
char
*
psz_configfile
;
///< location of config file
playlist_t
*
p_playlist
;
///< playlist object
void
*
p_stats_computer
;
///< Input thread computing stats (needs cleanup)
...
...
src/config/file.c
View file @
cf825526
...
...
@@ -46,7 +46,7 @@ static inline char *strdupnull (const char *src)
static
FILE
*
config_OpenConfigFile
(
vlc_object_t
*
p_obj
,
const
char
*
mode
)
{
char
*
psz_filename
=
p_obj
->
p_libvlc
->
psz_configfile
;
char
*
psz_filename
=
libvlc_priv
(
p_obj
->
p_libvlc
)
->
psz_configfile
;
FILE
*
p_stream
;
if
(
!
psz_filename
)
...
...
@@ -105,7 +105,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode )
#endif
else
if
(
p_stream
!=
NULL
)
{
p_obj
->
p_libvlc
->
psz_configfile
=
psz_filename
;
libvlc_priv
(
p_obj
->
p_libvlc
)
->
psz_configfile
=
psz_filename
;
}
return
p_stream
;
...
...
@@ -400,7 +400,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
/* Acquire config file lock */
vlc_mutex_lock
(
&
priv
->
config_lock
);
if
(
p_this
->
p_libvlc
->
psz_configfile
==
NULL
)
if
(
libvlc_priv
(
p_this
->
p_libvlc
)
->
psz_configfile
==
NULL
)
{
const
char
*
psz_configdir
=
p_this
->
p_libvlc
->
psz_configdir
;
if
(
!
psz_configdir
)
/* XXX: This should never happen */
...
...
src/libvlc-common.c
View file @
cf825526
...
...
@@ -304,7 +304,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
p_libvlc
->
psz_configdir
=
config_GetConfigDir
(
p_libvlc
);
p_libvlc
->
psz_datadir
=
config_GetUserDataDir
(
p_libvlc
);
p_libvlc
->
psz_cachedir
=
config_GetCacheDir
(
p_libvlc
);
p
_libvlc
->
psz_configfile
=
config_GetCustomConfigFile
(
p_libvlc
);
p
riv
->
psz_configfile
=
config_GetCustomConfigFile
(
p_libvlc
);
/* Check for plugins cache options */
if
(
config_GetInt
(
p_libvlc
,
"reset-plugins-cache"
)
>
0
)
...
...
@@ -1070,7 +1070,7 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
FREENULL
(
p_libvlc
->
psz_configdir
);
FREENULL
(
p_libvlc
->
psz_datadir
);
FREENULL
(
p_libvlc
->
psz_cachedir
);
FREENULL
(
p
_libvlc
->
psz_configfile
);
FREENULL
(
p
riv
->
psz_configfile
);
var_DelCallback
(
p_libvlc
,
"key-pressed"
,
vlc_key_to_action
,
p_libvlc
->
p_hotkeys
);
FREENULL
(
p_libvlc
->
p_hotkeys
);
...
...
src/libvlc.h
View file @
cf825526
...
...
@@ -208,7 +208,9 @@ static inline vlc_object_internals_t *vlc_internals( vlc_object_t *obj )
*/
typedef
struct
libvlc_priv_t
{
/* Configuration */
vlc_mutex_t
config_lock
;
///< config file lock
char
*
psz_configfile
;
///< location of config file
/* Messages */
msg_bank_t
msg_bank
;
///< The message bank
...
...
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