diff options
author | waker <wakeroid@gmail.com> | 2011-12-04 13:40:25 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-12-04 13:40:25 +0100 |
commit | 1f7ac98a588a3a8c314b9e6c2d75c4f807abfed0 (patch) | |
tree | 477f0fe99bdb6e4384810954ecd7a1d2754b72c4 /plugins/aac | |
parent | ead5e7ecd70eb18c36902a53a935e569fb3795e0 (diff) |
mp4ff: fixed infinite loop when trying to parse ATOM_UNKNOWN chunks
Diffstat (limited to 'plugins/aac')
-rw-r--r-- | plugins/aac/mp4ff/mp4meta.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/aac/mp4ff/mp4meta.c b/plugins/aac/mp4ff/mp4meta.c index a0c1b7e3..5e13c693 100644 --- a/plugins/aac/mp4ff/mp4meta.c +++ b/plugins/aac/mp4ff/mp4meta.c @@ -335,7 +335,13 @@ int32_t mp4ff_parse_metadata(mp4ff_t *f, const int32_t size) subsize = mp4ff_atom_read_header(f, &atom_type, &header_size); if (subsize == 0) break; - mp4ff_parse_tag(f, atom_type, (uint32_t)(subsize-header_size)); + if (atom_type == ATOM_UNKNOWN) { + // don't try to read unknown atoms + mp4ff_set_position(f, mp4ff_position(f)+subsize-header_size); + } + else { + mp4ff_parse_tag(f, atom_type, (uint32_t)(subsize-header_size)); + } sumsize += subsize; } |