/usr/bin/avos:AOS parse duration()
From ArchosDocs
Description
Parse the TIME block.
References To
The Code
int AOS_parse_duration(int fd /* -0x28 */)
{
char buf[8]; // -0x20
int ret = 0; // -0x18
int pos = 0; // -0x14
int read = 0; // -0x10
pos = (uint32_t)ftell64(fd);
if(pos == AOS_file_length)
return 252;
read = _aos_read(fd, &buf, 8);
if(read != 8)
return 209;
pos += *(uint32_t *)&buf[4];
if(*(uint32_t *)&buf[0] != 0x54494d45 /* TIME */)
ret = 244;
else
ret = AOS_callback_setup_duration(fd);
_aos_seek(fd, SEEK_SET, pos);
return ret;
}

