diff options
author | Anton Khirnov <wyskas@gmail.com> | 2010-02-15 21:14:47 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-02-15 21:14:47 +0000 |
commit | 4a3104a96a2b328688cfd137de4a60228889bd81 (patch) | |
tree | 543510630d06b8302f110457779dfb80071c315f /libavformat/asfdec.c | |
parent | cf55f59d5ecb11dd404a11418055a0b6c704226e (diff) | |
download | ffmpeg-4a3104a96a2b328688cfd137de4a60228889bd81.tar.gz |
workaround for broken files created by previous versions of asfenc.
Patch by Anton Khirnov, wyskas gmail
Originally committed as revision 21840 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r-- | libavformat/asfdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index ef7c2d309f..42c1944e90 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -436,9 +436,13 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) char name[1024]; name_len = get_le16(pb); + if (name_len%2) // must be even, broken lavf versions wrote len-1 + name_len += 1; get_str16_nolen(pb, name_len, name, sizeof(name)); value_type = get_le16(pb); value_len = get_le16(pb); + if (value_len%2) + value_len += 1; get_tag(s, name, value_type, value_len); } } else if (!guidcmp(&g, &ff_asf_metadata_header)) { |