Mercurial > libavformat.hg
changeset 5658:9e6fd33adfb4 libavformat
workaround for broken files created by previous versions of asfenc.
Patch by Anton Khirnov, wyskas gmail
author | cehoyos |
---|---|
date | Mon, 15 Feb 2010 21:14:47 +0000 |
parents | 7bf8594a625a |
children | d76ffa7128d4 |
files | asfdec.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/asfdec.c Sun Feb 14 19:00:36 2010 +0000 +++ b/asfdec.c Mon Feb 15 21:14:47 2010 +0000 @@ -436,9 +436,13 @@ 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)) {