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
6a427247
Commit
6a427247
authored
Nov 20, 2006
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore empty vorbis comments (closes #704)
Comment unusued artist & album musicbrainz ids
parent
a743fab8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
12 deletions
+43
-12
include/vlc_meta.h
include/vlc_meta.h
+10
-0
modules/codec/vorbis.c
modules/codec/vorbis.c
+31
-10
modules/meta_engine/id3tag.c
modules/meta_engine/id3tag.c
+2
-2
No files found.
include/vlc_meta.h
View file @
6a427247
...
...
@@ -72,8 +72,10 @@ struct vlc_meta_t
char
*
psz_encodedby
;
char
*
psz_arturl
;
char
*
psz_trackid
;
#if 0 //not used
char *psz_artistid;
char *psz_albumid;
#endif
int
i_status
;
#if 0
...
...
@@ -104,8 +106,10 @@ struct vlc_meta_t
#define vlc_meta_SetEncodedBy( meta, b ) vlc_meta_Set( meta, encodedby, b );
#define vlc_meta_SetArtURL( meta, b ) vlc_meta_Set( meta, arturl, b );
#define vlc_meta_SetTrackID( meta, b ) vlc_meta_Set( meta, trackid, b );
#if 0 //not used
#define vlc_meta_SetArtistID( meta, b ) vlc_meta_Set( meta, artistid, b );
#define vlc_meta_SetAlbumID( meta, b ) vlc_meta_Set( meta, albumid, b );
#endif
static
inline
vlc_meta_t
*
vlc_meta_New
(
void
)
...
...
@@ -129,8 +133,10 @@ static inline vlc_meta_t *vlc_meta_New( void )
m
->
psz_encodedby
=
NULL
;
m
->
psz_arturl
=
NULL
;
m
->
psz_trackid
=
NULL
;
#if 0 //not used
m->psz_artistid = NULL;
m->psz_albumid = NULL;
#endif
m
->
i_status
=
0
;
return
m
;
}
...
...
@@ -153,8 +159,10 @@ static inline void vlc_meta_Delete( vlc_meta_t *m )
free
(
m
->
psz_publisher
);
free
(
m
->
psz_encodedby
);
free
(
m
->
psz_trackid
);
#if 0 //not used
free( m->psz_artistid );
free( m->psz_albumid );
#endif
free
(
m
->
psz_arturl
);
free
(
m
);
...
...
@@ -184,8 +192,10 @@ static inline void vlc_meta_Merge( vlc_meta_t *dst, vlc_meta_t *src )
COPY_FIELD
(
publisher
);
COPY_FIELD
(
encodedby
);
COPY_FIELD
(
trackid
);
#if 0 //not used
COPY_FIELD( artistid );
COPY_FIELD( albumid );
#endif
COPY_FIELD
(
arturl
);
}
/** \todo Track meta */
...
...
modules/codec/vorbis.c
View file @
6a427247
...
...
@@ -626,38 +626,59 @@ static void ParseVorbisComments( decoder_t *p_dec )
psz_name
,
psz_value
);
if
(
!
strcasecmp
(
psz_name
,
"artist"
)
)
{
vlc_meta_SetArtist
(
p_input
->
input
.
p_item
->
p_meta
,
psz_value
);
input_ItemAddInfo
(
p_input
->
input
.
p_item
,
_
(
VLC_META_INFO_CAT
),
_
(
VLC_META_ARTIST
),
if
(
psz_value
&&
(
*
psz_value
!=
'\0'
)
)
{
vlc_meta_SetArtist
(
p_input
->
input
.
p_item
->
p_meta
,
psz_value
);
input_ItemAddInfo
(
p_input
->
input
.
p_item
,
_
(
VLC_META_INFO_CAT
),
_
(
VLC_META_ARTIST
),
"%s"
,
psz_value
);
}
}
else
if
(
!
strcasecmp
(
psz_name
,
"title"
)
)
{
vlc_meta_SetTitle
(
p_input
->
input
.
p_item
->
p_meta
,
if
(
psz_value
&&
(
*
psz_value
!=
'\0'
)
)
{
vlc_meta_SetTitle
(
p_input
->
input
.
p_item
->
p_meta
,
psz_value
);
p_input
->
input
.
p_item
->
psz_name
=
strdup
(
psz_value
);
p_input
->
input
.
p_item
->
psz_name
=
strdup
(
psz_value
);
}
}
else
if
(
!
strcasecmp
(
psz_name
,
"album"
)
)
{
vlc_meta_SetAlbum
(
p_input
->
input
.
p_item
->
p_meta
,
if
(
psz_value
&&
(
*
psz_value
!=
'\0'
)
)
{
vlc_meta_SetAlbum
(
p_input
->
input
.
p_item
->
p_meta
,
psz_value
);
}
}
else
if
(
!
strcasecmp
(
psz_name
,
"musicbrainz_trackid"
)
)
{
vlc_meta_SetTrackID
(
p_input
->
input
.
p_item
->
p_meta
,
if
(
psz_value
&&
(
*
psz_value
!=
'\0'
)
)
{
vlc_meta_SetTrackID
(
p_input
->
input
.
p_item
->
p_meta
,
psz_value
);
}
}
#if 0 //not used
else if( !strcasecmp( psz_name, "musicbrainz_artistid" ) )
{
vlc_meta_SetArtistID
(
p_input
->
input
.
p_item
->
p_meta
,
if( psz_value && ( *psz_value != '\0' ) )
{
vlc_meta_SetArtistID( p_input->input.p_item->p_meta,
psz_value );
}
}
else if( !strcasecmp( psz_name, "musicbrainz_albumid" ) )
{
vlc_meta_SetAlbumID
(
p_input
->
input
.
p_item
->
p_meta
,
if( psz_value && ( *psz_value != '\0' ) )
{
vlc_meta_SetAlbumID( p_input->input.p_item->p_meta,
psz_value );
}
}
#endif
}
/* FIXME */
var_SetInteger
(
p_input
,
"item-change"
,
p_input
->
input
.
p_item
->
i_id
);
...
...
modules/meta_engine/id3tag.c
View file @
6a427247
...
...
@@ -91,7 +91,7 @@ static void ParseID3Tag( demux_t *p_demux, uint8_t *p_data, int i_size )
}
i
++
;
}
#if 0 //not used
i = 0;
while( ( p_frame = id3_tag_findframe( p_id3_tag, "TXXX", i ) ) )
...
...
@@ -118,7 +118,7 @@ static void ParseID3Tag( demux_t *p_demux, uint8_t *p_data, int i_size )
free( psz_desc );
i++;
}
#endif
i
=
0
;
while
(
(
p_frame
=
id3_tag_findframe
(
p_id3_tag
,
"T"
,
i
)
)
)
...
...
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