Lines Matching defs:offset
54 int sector_bits; /**< sector shift bits; used to convert sector number into pb_filesystem offset */
63 static int64_t seek_by_sector(AVIOContext *pb, int64_t sector, int64_t offset)
65 return avio_seek(pb, (sector << WTV_SECTOR_BITS) + offset, SEEK_SET);
109 static int64_t wtvfile_seek(void *opaque, int64_t offset, int whence)
117 offset = wf->position + offset;
119 offset = wf->length;
121 wf->error = offset < 0 || offset >= wf->length ||
122 seek_by_sector(pb, wf->sectors[offset >> wf->sector_bits],
123 offset & ((1 << wf->sector_bits) - 1)) < 0;
124 wf->position = offset;
125 return offset;