diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-03-09 01:21:09 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-03-09 01:21:09 +0000 |
commit | cc255afeb53d31938b6ac01cebf61cf7517ad08d (patch) | |
tree | 4e7bdf93109ebda3c625856ad92a88420e18c4a9 /libavformat/movenc.c | |
parent | b0e88ca6d3e0953e0537dd6747c72254e2a946f7 (diff) | |
download | ffmpeg-cc255afeb53d31938b6ac01cebf61cf7517ad08d.tar.gz |
Correctly mark mov metadata as utf-8, using iso language code
Originally committed as revision 22368 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index ecabd8e140..bccff37e5d 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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))) { len2 = strlen(t2->key); 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; break; } } + if (!lang) + lang = ff_mov_iso639_to_lang("und", 1); return mov_write_string_tag(pb, name, t->value, lang, long_style); } |