Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f0ef4213
Commit
f0ef4213
authored
Sep 22, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SD_mediadirs: no need to strdup.
parent
d0142f4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
modules/services_discovery/mediadirs.c
modules/services_discovery/mediadirs.c
+4
-6
No files found.
modules/services_discovery/mediadirs.c
View file @
f0ef4213
...
...
@@ -107,7 +107,7 @@ struct services_discovery_sys_t
enum
type_e
i_type
;
char
*
psz_dir
[
2
];
char
*
psz_var
;
c
onst
c
har
*
psz_var
;
};
/*****************************************************************************
...
...
@@ -129,21 +129,21 @@ static int Open( vlc_object_t *p_this, enum type_e i_type )
p_sys
->
psz_dir
[
0
]
=
config_GetUserDir
(
VLC_VIDEOS_DIR
);
p_sys
->
psz_dir
[
1
]
=
var_CreateGetString
(
p_sd
,
"input-record-path"
);
p_sys
->
psz_var
=
strdup
(
"record-file"
)
;
p_sys
->
psz_var
=
"record-file"
;
}
else
if
(
p_sys
->
i_type
==
Audio
)
{
p_sys
->
psz_dir
[
0
]
=
config_GetUserDir
(
VLC_MUSIC_DIR
);
p_sys
->
psz_dir
[
1
]
=
var_CreateGetString
(
p_sd
,
"input-record-path"
);
p_sys
->
psz_var
=
strdup
(
"record-file"
)
;
p_sys
->
psz_var
=
"record-file"
;
}
else
if
(
p_sys
->
i_type
==
Picture
)
{
p_sys
->
psz_dir
[
0
]
=
config_GetUserDir
(
VLC_PICTURES_DIR
);
p_sys
->
psz_dir
[
1
]
=
var_CreateGetString
(
p_sd
,
"snapshot-path"
);
p_sys
->
psz_var
=
strdup
(
"snapshot-file"
)
;
p_sys
->
psz_var
=
"snapshot-file"
;
}
else
{
...
...
@@ -156,7 +156,6 @@ static int Open( vlc_object_t *p_this, enum type_e i_type )
if
(
vlc_clone
(
&
p_sys
->
thread
,
Run
,
p_sd
,
VLC_THREAD_PRIORITY_LOW
)
)
{
var_DelCallback
(
p_sd
->
p_libvlc
,
p_sys
->
psz_var
,
onNewFileAdded
,
p_sd
);
free
(
p_sys
->
psz_var
);
free
(
p_sys
->
psz_dir
[
1
]
);
free
(
p_sys
->
psz_dir
[
0
]
);
free
(
p_sys
);
...
...
@@ -233,7 +232,6 @@ static void Close( vlc_object_t *p_this )
var_DelCallback
(
p_sd
->
p_libvlc
,
p_sys
->
psz_var
,
onNewFileAdded
,
p_sd
);
free
(
p_sys
->
psz_var
);
free
(
p_sys
->
psz_dir
[
1
]
);
free
(
p_sys
->
psz_dir
[
0
]
);
free
(
p_sys
);
...
...
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