[Vorbis / Opus] Do not assume text encoding

Stream metadata encoding may not be UTF-8, even though the Vorbis
Comment specification clearly calls for this.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-24 19:12:38 -07:00
parent abf80c19ac
commit 50b7390181
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ opus_int64 sourceTell(void *_stream) {
for(int i = 0; i < tagCount; ++i) {
const char *value = opus_tags_query(tags, [tag UTF8String], i);
[tagStrings addObject:[NSString stringWithUTF8String:value]];
[tagStrings addObject:guess_encoding_of_string(value)];
}
return [tagStrings componentsJoinedByString:@", "];

View File

@ -126,7 +126,7 @@ long sourceTell(void *datasource) {
for(int i = 0; i < tagCount; ++i) {
const char *value = vorbis_comment_query(tags, [tag UTF8String], i);
[tagStrings addObject:[NSString stringWithUTF8String:value]];
[tagStrings addObject:guess_encoding_of_string(value)];
}
return [tagStrings componentsJoinedByString:@", "];