Skip to content

xiph_metadata: Don't check UTF8 encoding on a base64 string

When profiling the media library on a small samples folder, the calls to EnsureUTF8 end up accounting for about 8% of the runtime (including calls to vlc_towc)

With that change, we only spend 0.04% of the time in EnsureUTF8

Since the picture is base64 encoded, we don't expect anything out of the ascii range, and if it was to contain characters out of that range, the picture would likely be invalid anyway.

Edited by Hugo Beauzée-Luyssen

Merge request reports

Loading