Commit a0781a0e authored by bcoudurier's avatar bcoudurier

Correctly mark mov metadata as utf-8, using iso language code

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22368 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 572d16db
...@@ -1390,11 +1390,13 @@ static int mov_write_string_metadata(AVFormatContext *s, ByteIOContext *pb, ...@@ -1390,11 +1390,13 @@ static int mov_write_string_metadata(AVFormatContext *s, ByteIOContext *pb,
while ((t2 = av_metadata_get(s->metadata, tag2, t2, AV_METADATA_IGNORE_SUFFIX))) { while ((t2 = av_metadata_get(s->metadata, tag2, t2, AV_METADATA_IGNORE_SUFFIX))) {
len2 = strlen(t2->key); len2 = strlen(t2->key);
if (len2 == len+4 && !strcmp(t->value, t2->value) if (len2 == len+4 && !strcmp(t->value, t2->value)
&& (l=ff_mov_iso639_to_lang(&t2->key[len2-3], 0)) >= 0) { && (l=ff_mov_iso639_to_lang(&t2->key[len2-3], 1)) >= 0) {
lang = l; lang = l;
break; break;
} }
} }
if (!lang)
lang = ff_mov_iso639_to_lang("und", 1);
return mov_write_string_tag(pb, name, t->value, lang, long_style); return mov_write_string_tag(pb, name, t->value, lang, long_style);
} }
......
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