- off_t off = (*fi->p->tellf)(fi->p->fh);
- (*fi->p->endf)(fi->p->fh, off - (fi->max - fi->offset));
+ off_t off = fi->p->stream->tellf(fi->p->stream);
+ off_t end_offset = off - (fi->max - fi->offset);
+ fi->p->stream->endf(fi->p->stream, &end_offset);