Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f5a89204
Commit
f5a89204
authored
Aug 17, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
M3U export: small code factorization
parent
bf472b10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
modules/misc/playlist/m3u.c
modules/misc/playlist/m3u.c
+4
-9
No files found.
modules/misc/playlist/m3u.c
View file @
f5a89204
...
...
@@ -50,10 +50,11 @@ int Export_M3U8( vlc_object_t * );
static
void
DoChildren
(
playlist_export_t
*
p_export
,
playlist_item_t
*
p_root
,
int
(
*
pf_fprintf
)
(
FILE
*
,
const
char
*
,
...)
)
{
int
i
,
j
;
/* Write header */
fputs
(
"#EXTM3U
\n
"
,
p_export
->
p_file
);
/* Go through the playlist and add items */
for
(
i
=
0
;
i
<
p_root
->
i_children
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
p_root
->
i_children
;
i
++
)
{
playlist_item_t
*
p_current
=
p_root
->
pp_children
[
i
];
assert
(
p_current
);
...
...
@@ -97,7 +98,7 @@ static void DoChildren( playlist_export_t *p_export, playlist_item_t *p_root,
/* VLC specific options */
vlc_mutex_lock
(
&
p_current
->
p_input
->
lock
);
for
(
j
=
0
;
j
<
p_current
->
p_input
->
i_options
;
j
++
)
for
(
int
j
=
0
;
j
<
p_current
->
p_input
->
i_options
;
j
++
)
{
pf_fprintf
(
p_export
->
p_file
,
"#EXTVLCOPT:%s
\n
"
,
p_current
->
p_input
->
ppsz_options
[
j
][
0
]
==
':'
?
...
...
@@ -124,9 +125,6 @@ int Export_M3U( vlc_object_t *p_this )
msg_Dbg
(
p_export
,
"saving using M3U format"
);
/* Write header */
fputs
(
"#EXTM3U
\n
"
,
p_export
->
p_file
);
DoChildren
(
p_export
,
p_export
->
p_root
,
utf8_fprintf
);
return
VLC_SUCCESS
;
}
...
...
@@ -137,9 +135,6 @@ int Export_M3U8( vlc_object_t *p_this )
msg_Dbg
(
p_export
,
"saving using M3U8 format"
);
/* Write header */
fputs
(
"#EXTM3U
\n
"
,
p_export
->
p_file
);
DoChildren
(
p_export
,
p_export
->
p_root
,
fprintf
);
return
VLC_SUCCESS
;
}
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