Lines Matching refs:index_table
1102 static int mxf_edit_unit_absolute_offset(MXFContext *mxf, MXFIndexTable *index_table, int64_t edit_unit, int64_t *edit_unit_out, int64_t *offset_out, int nag)
1107 for (i = 0; i < index_table->nb_segments; i++) {
1108 MXFIndexTableSegment *s = index_table->segments[i];
1123 index_table->index_sid, s->index_start_position);
1130 index_table->index_sid, s->index_start_position);
1137 return mxf_absolute_bodysid_offset(mxf, index_table->body_sid, offset_temp, offset_out);
1145 av_log(mxf->fc, AV_LOG_ERROR, "failed to map EditUnit %"PRId64" in IndexSID %i to an offset\n", edit_unit, index_table->index_sid);
1150 static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_table)
1156 for (i = 0; i < index_table->nb_segments; i++) {
1157 MXFIndexTableSegment *s = index_table->segments[i];
1160 index_table->nb_ptses = 0;
1164 index_table->nb_ptses += s->index_duration;
1168 if (index_table->nb_ptses <= 0)
1171 if (!(index_table->ptses = av_calloc(index_table->nb_ptses, sizeof(int64_t))) ||
1172 !(index_table->fake_index = av_calloc(index_table->nb_ptses, sizeof(AVIndexEntry)))) {
1173 av_freep(&index_table->ptses);
1179 for (x = 0; x < index_table->nb_ptses; x++)
1180 index_table->ptses[x] = AV_NOPTS_VALUE;
1209 for (i = x = 0; i < index_table->nb_segments; i++) {
1210 MXFIndexTableSegment *s = index_table->segments[i];
1224 if (x >= index_table->nb_ptses) {
1231 index_table->fake_index[x].timestamp = x;
1232 index_table->fake_index[x].flags = !(s->flag_entries[j] & 0x30) ? AVINDEX_KEYFRAME : 0;
1234 if (index < 0 || index >= index_table->nb_ptses) {
1241 index_table->ptses[index] = x;
1246 index_table->first_dts = -max_temporal_offset;