asfdec: only unicode tags must have even length.
authorBenoit Fouet <benoit.fouet@free.fr>
Wed, 24 Feb 2010 07:31:03 +0000 (07:31 +0000)
committerBenoit Fouet <benoit.fouet@free.fr>
Wed, 24 Feb 2010 07:31:03 +0000 (07:31 +0000)
Patch from: Anton Khirnov wyskas gmail

Originally committed as revision 22016 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/asfdec.c

index 42c1944..7f26cf1 100644 (file)
@@ -441,7 +441,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     get_str16_nolen(pb, name_len, name, sizeof(name));
                     value_type = get_le16(pb);
                     value_len  = get_le16(pb);
-                    if (value_len%2)
+                    if (!value_type && value_len%2)
                         value_len += 1;
                     get_tag(s, name, value_type, value_len);
             }