Commit 7fa59087 authored by cehoyos's avatar cehoyos

workaround for broken files created by previous versions of asfenc.

Patch by Anton Khirnov, wyskas gmail


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21840 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 54c26be3
...@@ -436,9 +436,13 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -436,9 +436,13 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
char name[1024]; char name[1024];
name_len = get_le16(pb); 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)); get_str16_nolen(pb, name_len, name, sizeof(name));
value_type = get_le16(pb); value_type = get_le16(pb);
value_len = get_le16(pb); value_len = get_le16(pb);
if (value_len%2)
value_len += 1;
get_tag(s, name, value_type, value_len); get_tag(s, name, value_type, value_len);
} }
} else if (!guidcmp(&g, &ff_asf_metadata_header)) { } else if (!guidcmp(&g, &ff_asf_metadata_header)) {
......
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