'Update offset table in the specified atom.'

def __update_offset_table(self, fileobj, fmt, atom, delta, offset):

    if (atom.offset > offset):
        atom.offset += delta
    fileobj.seek((atom.offset + 12))
    data = fileobj.read((atom.length - 12))
    fmt = (fmt % cdata.uint_be(data[:4]))
    offsets = struct.unpack(fmt, data[4:])
    offsets = [(o + (0, delta)[(offset < o)]) for o in offsets]
    fileobj.seek((atom.offset + 16))
    fileobj.write(struct.pack(fmt, *offsets))
