diff options
author | Anton Khirnov <wyskas@gmail.com> | 2010-02-15 21:19:40 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-02-15 21:19:40 +0000 |
commit | 83a6c1a69cf74123adf53d6688ddc645e2161840 (patch) | |
tree | f48e1ca421d3d9b8902b3cf9e6463cf026205436 /libavformat/asfenc.c | |
parent | 4a3104a96a2b328688cfd137de4a60228889bd81 (diff) | |
download | ffmpeg-83a6c1a69cf74123adf53d6688ddc645e2161840.tar.gz |
Strings in extended content header are UTF16,
so terminating NULLs are 2 bytes long, not 1.
Patch by Anton Khirnov, wyskas gmail
Originally committed as revision 21841 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asfenc.c')
-rw-r--r-- | libavformat/asfenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index b749ce7434..cea7180e50 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -352,13 +352,13 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data hpos = put_header(pb, &ff_asf_extended_content_header); put_le16(pb, metadata_count); while ((tag = av_metadata_get(s->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX))) { - put_le16(pb, 2*(strlen(tag->key) + 3) + 1); + put_le16(pb, 2*(strlen(tag->key) + 4)); put_le16(pb, 'W'); put_le16(pb, 'M'); put_le16(pb, '/'); put_str16_nolen(pb, tag->key); put_le16(pb, 0); - put_le16(pb, 2*strlen(tag->value) + 1); + put_le16(pb, 2*(strlen(tag->value) + 1)); put_str16_nolen(pb, tag->value); } end_header(pb, hpos); |