static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
    int64_t total_size = 0;
    MOV_atom_t a;
    int i;
    int err = 0;
    a.offset = atom.offset;
    if (atom.size < 0)
        atom.size = INT64_MAX;
    while(((total_size + 8) < atom.size) && !url_feof(pb) && !err) {
        a.size = atom.size;
        a.type=0;
        if(atom.size >= 8) {
            a.size = get_be32(pb);
            a.type = get_le32(pb);
        }
        total_size += 8;
        a.offset += 8;
        dprintf(c->fc, "type: %08x  %.4s  sz: %"PRIx64"  %"PRIx64"   %"PRIx64"\n",
                a.type, (char*)&a.type, a.size, atom.size, total_size);
        if (a.size == 1) {
            a.size = get_be64(pb) - 8;
            a.offset += 8;
            total_size += 8;
        }
        if (a.size == 0) {
            a.size = atom.size - total_size;
            if (a.size <= 8)
                break;
        }
        a.size -= 8;
        if(a.size < 0)
            break;
        a.size = FFMIN(a.size, atom.size - total_size);
        for (i = 0; mov_default_parse_table[i].type != 0
             && mov_default_parse_table[i].type != a.type; i++)
             ;
        if (mov_default_parse_table[i].type == 0) {
            url_fskip(pb, a.size);
        } else {
            offset_t start_pos = url_ftell(pb);
            int64_t left;
            err = mov_default_parse_table[i].parse(c, pb, a);
            if (url_is_streamed(pb) && c->found_moov && c->found_mdat)
                break;
            left = a.size - url_ftell(pb) + start_pos;
            if (left > 0)
                url_fskip(pb, left);
        }
        a.offset += a.size;
        total_size += a.size;
    }
    if (!err && total_size < atom.size && atom.size < 0x7ffff)
        url_fskip(pb, atom.size - total_size);
    return err;
}
['static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)\n{\n    int64_t total_size = 0;\n    MOV_atom_t a;\n    int i;\n    int err = 0;\n    a.offset = atom.offset;\n    if (atom.size < 0)\n        atom.size = INT64_MAX;\n    while(((total_size + 8) < atom.size) && !url_feof(pb) && !err) {\n        a.size = atom.size;\n        a.type=0;\n        if(atom.size >= 8) {\n            a.size = get_be32(pb);\n            a.type = get_le32(pb);\n        }\n        total_size += 8;\n        a.offset += 8;\n        dprintf(c->fc, "type: %08x  %.4s  sz: %"PRIx64"  %"PRIx64"   %"PRIx64"\\n",\n                a.type, (char*)&a.type, a.size, atom.size, total_size);\n        if (a.size == 1) {\n            a.size = get_be64(pb) - 8;\n            a.offset += 8;\n            total_size += 8;\n        }\n        if (a.size == 0) {\n            a.size = atom.size - total_size;\n            if (a.size <= 8)\n                break;\n        }\n        a.size -= 8;\n        if(a.size < 0)\n            break;\n        a.size = FFMIN(a.size, atom.size - total_size);\n        for (i = 0; mov_default_parse_table[i].type != 0\n             && mov_default_parse_table[i].type != a.type; i++)\n             ;\n        if (mov_default_parse_table[i].type == 0) {\n            url_fskip(pb, a.size);\n        } else {\n            offset_t start_pos = url_ftell(pb);\n            int64_t left;\n            err = mov_default_parse_table[i].parse(c, pb, a);\n            if (url_is_streamed(pb) && c->found_moov && c->found_mdat)\n                break;\n            left = a.size - url_ftell(pb) + start_pos;\n            if (left > 0)\n                url_fskip(pb, left);\n        }\n        a.offset += a.size;\n        total_size += a.size;\n    }\n    if (!err && total_size < atom.size && atom.size < 0x7ffff)\n        url_fskip(pb, atom.size - total_size);\n    return err;\n}']