Lines Matching defs:chunk

94     int             cur_rec;          /* current record in this chunk */
95 int num_recs; /* number of recs in this chunk */
98 uint8_t chunk[CHUNK_SIZE];
167 static int analyze_chunk(AVFormatContext *s, const uint8_t *chunk)
175 if (AV_RB32(&chunk[0]) == TIVO_PES_FILEID)
178 /* number of records in chunk (we ignore high order byte;
180 num_recs = chunk[0];
182 /* try again with the next chunk. Sometimes there are dead ones */
186 chunk += 4; /* skip past rec count & SEQ bytes */
187 ff_dlog(s, "probe: chunk has %d recs\n", num_recs);
188 hdrs = parse_chunk_headers(chunk, num_recs);
216 ff_dlog(s, "probe: chunk has %d 0x6e0 recs, %d 0xbe0 recs.\n",
252 &chunk[data_offset], 5);
255 if ((chunk[data_offset + 6 + pes_offset] & 0x80) == 0x80) {
290 avio_read(pb, ty->chunk, CHUNK_SIZE);
292 ret = analyze_chunk(s, ty->chunk);
340 ff_dlog(s, "parsing ty chunk #%d\n", ty->cur_chunk);
342 /* if we have left-over filler space from the last chunk, get that */
347 read_size = avio_read(pb, ty->chunk, CHUNK_SIZE);
350 if ((read_size < 4) || (AV_RB32(ty->chunk) == 0)) {
355 if (AV_RB32(ty->chunk) == TIVO_PES_FILEID) {
356 /* skip master chunk and read new chunk */
360 /* number of records in chunk (8- or 16-bit number) */
361 if (ty->chunk[3] & 0x80) {
363 ty->num_recs = num_recs = (ty->chunk[1] << 8) + ty->chunk[0];
366 ty->num_recs = num_recs = ty->chunk[0];
371 ff_dlog(s, "chunk has %d records\n", num_recs);
379 ty->rec_hdrs = parse_chunk_headers(ty->chunk + 4, num_recs);
400 es_offset1 = find_es_header(ty_VideoPacket, ty->chunk + ty->cur_chunk_pos, 5);
403 ty->chunk + ty->cur_chunk_pos + es_offset1 + VIDEO_PTS_OFFSET);
414 memcpy(pkt->data, ty->chunk + ty->cur_chunk_pos, size);
438 memcpy(pkt->data, ty->chunk + ty->cur_chunk_pos, rec_size);
532 memcpy(ty->pes_buffer + ty->pes_buf_cnt, ty->chunk + ty->cur_chunk_pos, rec_size);
539 memcpy(ty->pes_buffer + ty->pes_buf_cnt, ty->chunk + ty->cur_chunk_pos, need);
561 memcpy(pkt->data, ty->chunk + ty->cur_chunk_pos, rec_size - need);
583 memcpy(pkt->data, ty->chunk + ty->cur_chunk_pos, rec_size);
614 memcpy(pkt->data, ty->chunk + ty->cur_chunk_pos, rec_size);
621 memcpy(pkt->data, ty->chunk + ty->cur_chunk_pos, rec_size);