Commit ef1af103 authored by Rémi Duraffort's avatar Rémi Duraffort

taglib: accept the Xiph comments with more than one embedded art,

but take only the first one.
parent ecadb547
...@@ -270,21 +270,21 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_t* p_demux, demux_met ...@@ -270,21 +270,21 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_t* p_demux, demux_met
StringList mime_list = tag->fieldListMap()[ "COVERARTMIME" ]; StringList mime_list = tag->fieldListMap()[ "COVERARTMIME" ];
StringList art_list = tag->fieldListMap()[ "COVERART" ]; StringList art_list = tag->fieldListMap()[ "COVERART" ];
/* we support only one cover in ogg/vorbis */ // We get only the first covert art
if( mime_list.size() != 1 || art_list.size() != 1 ) if( mime_list.size() > 1 || art_list.size() > 1 )
msg_Warn( p_demux, "Found %i embedded arts, so using only the first one",
art_list.size() );
else if( mime_list.size() == 0 || art_list.size() == 0 )
return; return;
input_attachment_t *p_attachment; input_attachment_t *p_attachment;
const char *psz_name, *psz_mime, *psz_description; const char* psz_name = "cover";
uint8_t *p_data; const char* psz_mime = mime_list[0].toCString(true);
int i_data; const char* psz_description = "cover";
psz_name = "cover";
psz_mime = mime_list[0].toCString(true);
psz_description = "cover";
i_data = vlc_b64_decode_binary( &p_data, art_list[0].toCString(true) ); uint8_t *p_data;
int i_data = vlc_b64_decode_binary( &p_data, art_list[0].toCString(true) );
msg_Dbg( p_demux, "Found embedded art: %s (%s) is %i bytes", msg_Dbg( p_demux, "Found embedded art: %s (%s) is %i bytes",
psz_name, psz_mime, i_data ); psz_name, psz_mime, i_data );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment