Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
65dfe0cd by Hugo Beauzée-Luyssen at 2021-09-14T11:35:56+00:00
taglib: Don't convert base64 strings to UTF8

The convertion will incur a cost which we don't want to pay since the
art needs to be encoded in base64, which doesn't include anything
outside of ASCII

- - - - -


1 changed file:

- modules/meta_engine/taglib.cpp


Changes:

=====================================
modules/meta_engine/taglib.cpp
=====================================
@@ -764,7 +764,7 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, 
demux_meta_t* p_demux_meta,
         const char* psz_description = "cover";
 
         uint8_t *p_data;
-        int i_data = vlc_b64_decode_binary( &p_data, 
art_list[0].toCString(true) );
+        int i_data = vlc_b64_decode_binary( &p_data, 
art_list[0].toCString(false) );
 
         msg_Dbg( p_demux_meta, "Found embedded art: %s (%s) is %i bytes",
                 psz_name, psz_mime, i_data );
@@ -782,7 +782,7 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, 
demux_meta_t* p_demux_meta,
         uint8_t *p_data;
         int i_cover_score;
         int i_cover_idx;
-        int i_data = vlc_b64_decode_binary( &p_data, 
block_picture_list[0].toCString(true) );
+        int i_data = vlc_b64_decode_binary( &p_data, 
block_picture_list[0].toCString(false) );
         i_cover_score = i_cover_idx = 0;
         /* TODO: Use i_cover_score / i_cover_idx to select the picture. */
         p_attachment = ParseFlacPicture( p_data, i_data, 0,



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/65dfe0cdc97bbb98ad34a690989636d40f326e32

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/65dfe0cdc97bbb98ad34a690989636d40f326e32
You're receiving this email because of your account on code.videolan.org.


_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to