Lines Matching defs:length
60 int64_t length;
79 if (wf->position >= wf->length || avio_feof(pb))
82 buf_size = FFMIN(buf_size, wf->length - wf->position);
107 * @return position (or file length)
115 return wf->length;
119 offset = wf->length;
121 wf->error = offset < 0 || offset >= wf->length ||
148 * @param length Length of file (bytes)
152 static AVIOContext * wtvfile_open_sector(unsigned first_sector, uint64_t length, int depth, AVFormatContext *s)
202 wf->sector_bits = length & (1ULL<<63) ? WTV_SECTOR_BITS : WTV_BIGSECTOR_BITS;
214 /* check length */
215 length &= 0xFFFFFFFFFFFF;
216 if (length > ((int64_t)wf->nb_sectors << wf->sector_bits)) {
217 av_log(s, AV_LOG_WARNING, "reported file length (0x%"PRIx64") exceeds number of available sectors (0x%"PRIx64")\n", length, (int64_t)wf->nb_sectors << wf->sector_bits);
218 length = (int64_t)wf->nb_sectors << wf->sector_bits;
220 wf->length = length;
274 "bad filename length, remaining directory entries ignored\n");
279 "bad dir length, remaining directory entries ignored\n");
432 static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
457 avio_seek(pb, pos + length, SEEK_SET);
460 static void get_tag(AVFormatContext *s, AVIOContext *pb, const char *key, int type, int length)
466 avio_skip(pb, length);
470 buf_size = FFMAX(2*length, LEN_PRETTY_GUID) + 1;
475 if (type == 0 && length == 4) {
478 avio_get_str16le(pb, length, buf, buf_size);
483 } else if (type == 3 && length == 4) {
485 } else if (type == 4 && length == 8) {
508 } else if (type == 5 && length == 2) {
510 } else if (type == 6 && length == 16) {
515 get_attachment(s, pb, length);
520 av_log(s, AV_LOG_WARNING, "unsupported metadata entry; key:%s, type:%d, length:0x%x\n", key, type, length);
521 avio_skip(pb, length);
535 int length, type;
540 length = avio_rl32(pb);
541 if (!length)
549 get_tag(s, pb, key, type, length);