[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
parent
abf80c19ac
commit
50b7390181
|
@ -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:@", "];
|
||||
|
|
|
@ -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:@", "];
|
||||
|
|
Loading…
Reference in New Issue