Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
918a6962
Commit
918a6962
authored
Jul 15, 2009
by
ivoire
Browse files
itml: factorize and add missing #undef.
parent
6798f250
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/demux/playlist/itml.c
View file @
918a6962
...
...
@@ -451,6 +451,7 @@ static bool save_data SIMPLE_INTERFACE
long
i_num
=
atol
(
psz_value
);
p_track
->
duration
=
(
mtime_t
)
i_num
*
1000
;
}
#undef SAVE_INFO
return
true
;
}
...
...
@@ -464,15 +465,15 @@ static bool add_meta( input_item_t *p_input_item,
if
(
!
p_input_item
||
!
p_track
)
return
false
;
#define SET_INFO(
func
, prop ) \
if( p_track->prop ) {
func
( p_input_item, p_track->prop );
}
SET_INFO
(
input_item_SetTitle
,
name
)
SET_INFO
(
input_item_SetArtist
,
artist
)
SET_INFO
(
input_item_SetAlbum
,
album
)
SET_INFO
(
input_item_SetGenre
,
genre
)
SET_INFO
(
input_item_SetTrackNum
,
trackNum
)
SET_INFO
(
input_item_SetDuration
,
duration
)
#define SET_INFO(
type
, prop ) \
if( p_track->prop ) {
input_item_Set##type
( p_input_item, p_track->prop );}
SET_INFO
(
Title
,
name
)
SET_INFO
(
Artist
,
artist
)
SET_INFO
(
Album
,
album
)
SET_INFO
(
Genre
,
genre
)
SET_INFO
(
TrackNum
,
trackNum
)
SET_INFO
(
Duration
,
duration
)
#undef
SET_INFO
return
true
;
}
...
...
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