Lines Matching refs:sti
1866 FFStream *const sti = ffstream(st);
1895 sti->display_aspect_ratio = (AVRational){ num, den };
2554 FFStream *const sti = ffstream(st);
2632 sti->need_parsing = AVSTREAM_PARSE_FULL;
2637 sti->need_parsing = AVSTREAM_PARSE_HEADERS;
2983 FFStream *sti;
2990 sti = ffstream(st);
3002 if (!sti->need_parsing && st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
3003 sti->need_parsing = AVSTREAM_PARSE_HEADERS;
3530 FFStream *const sti = ffstream(st);
3531 AVIndexEntry *e_keep = sti->index_entries;
3532 int nb_keep = sti->nb_index_entries;
3545 sti->index_entries = e_old;
3546 sti->nb_index_entries = nb_old;
3599 sti->index_entries = e_keep;
3600 sti->nb_index_entries = nb_keep;
3618 FFStream *const sti = ffstream(st);
3621 const size_t min_size_needed = (sti->nb_index_entries + 1) * sizeof(AVIndexEntry);
3626 min_size_needed > sti->index_entries_allocated_size ?
3627 FFMAX(min_size_needed, 2 * sti->index_entries_allocated_size) :
3630 if (sti->nb_index_entries + 1U >= UINT_MAX / sizeof(AVIndexEntry))
3633 entries = av_fast_realloc(sti->index_entries,
3634 &sti->index_entries_allocated_size,
3639 sti->index_entries = entries;
3641 index = sti->nb_index_entries++;
3659 FFStream *const sti = ffstream(st);
3661 av_assert0(end_index >= 0 && end_index <= sti->nb_index_entries);
3664 sti->index_entries[end_index - 1 - i].timestamp = end_ts;
3703 FFStream *const sti = ffstream(st);
3716 for (int ind = 0; ind < sti->nb_index_entries && ctts_ind < msc->ctts_count; ++ind) {
3723 pts_buf[j] = sti->index_entries[ind].timestamp + msc->ctts_data[ctts_ind].duration;
3811 FFStream *const sti = ffstream(st);
3812 AVIndexEntry *e_old = sti->index_entries;
3813 int nb_old = sti->nb_index_entries;
3857 sti->index_entries = NULL;
3858 sti->index_entries_allocated_size = 0;
3859 sti->nb_index_entries = 0;
3904 sti->skip_samples = msc->start_pad = 0;
3979 sti->skip_samples += packet_skip_samples;
3988 fix_index_entry_timestamps(st, sti->nb_index_entries, edit_list_dts_counter,
4012 sti->skip_samples += frame_duration;
4027 fix_index_entry_timestamps(st, sti->nb_index_entries, edit_list_dts_counter,
4088 for (int i = 0; i < sti->nb_index_entries; ++i)
4089 sti->index_entries[i].timestamp -= msc->min_corrected_pts;
4097 msc->start_pad = sti->skip_samples;
4185 FFStream *const sti = ffstream(st);
4258 if (!sc->sample_count || sti->nb_index_entries)
4260 if (sc->sample_count >= UINT_MAX / sizeof(*sti->index_entries) - sti->nb_index_entries)
4262 if (av_reallocp_array(&sti->index_entries,
4263 sti->nb_index_entries + sc->sample_count,
4264 sizeof(*sti->index_entries)) < 0) {
4265 sti->nb_index_entries = 0;
4268 sti->index_entries_allocated_size = (sti->nb_index_entries + sc->sample_count) * sizeof(*sti->index_entries);
4358 e = &sti->index_entries[sti->nb_index_entries++];
4367 if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && sti->nb_index_entries < 100)
4421 if (total >= UINT_MAX / sizeof(*sti->index_entries) - sti->nb_index_entries)
4423 if (av_reallocp_array(&sti->index_entries,
4424 sti->nb_index_entries + total,
4425 sizeof(*sti->index_entries)) < 0) {
4426 sti->nb_index_entries = 0;
4429 sti->index_entries_allocated_size = (sti->nb_index_entries + total) * sizeof(*sti->index_entries);
4464 if (sti->nb_index_entries >= total) {
4472 e = &sti->index_entries[sti->nb_index_entries++];
4495 if (st->start_time == AV_NOPTS_VALUE && st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && sti->nb_index_entries > 0) {
4496 st->start_time = sti->index_entries[0].timestamp + sc->dts_shift;
5159 FFStream *sti = NULL;
5182 sti = ffstream(st);
5200 index_entry_pos = sti->nb_index_entries;
5209 av_assert0(index_entry_pos <= sti->nb_index_entries);
5274 if ((uint64_t)sti->nb_index_entries + entries >= UINT_MAX / sizeof(AVIndexEntry)) {
5275 entries = UINT_MAX / sizeof(AVIndexEntry) - sti->nb_index_entries;
5281 requested_size = (sti->nb_index_entries + entries) * sizeof(AVIndexEntry);
5282 new_entries = av_fast_realloc(sti->index_entries,
5283 &sti->index_entries_allocated_size,
5287 sti->index_entries= new_entries;
5289 requested_size = (sti->nb_index_entries + entries) * sizeof(*sc->ctts_data);
5303 if (index_entry_pos < sti->nb_index_entries) {
5305 memmove(sti->index_entries + index_entry_pos + entries,
5306 sti->index_entries + index_entry_pos,
5307 sizeof(*sti->index_entries) *
5308 (sti->nb_index_entries - index_entry_pos));
5317 sti->nb_index_entries += entries;
5318 sc->ctts_count = sti->nb_index_entries;
5325 prev_dts = sti->index_entries[index_entry_pos-1].timestamp;
5374 sti->index_entries[index_entry_pos].pos = offset;
5375 sti->index_entries[index_entry_pos].timestamp = dts;
5376 sti->index_entries[index_entry_pos].size = sample_size;
5377 sti->index_entries[index_entry_pos].min_distance = distance;
5378 sti->index_entries[index_entry_pos].flags = index_entry_flags;
5409 memmove(sti->index_entries + index_entry_pos,
5410 sti->index_entries + index_entry_pos + gap,
5411 sizeof(*sti->index_entries) *
5412 (sti->nb_index_entries - (index_entry_pos + gap)));
5418 sti->nb_index_entries -= gap;
5431 prev_dts = sti->index_entries[index_entry_pos-1].timestamp;
5432 for (int i = index_entry_pos; i < sti->nb_index_entries; i++) {
5433 if (prev_dts < sti->index_entries[i].timestamp)
5435 sti->index_entries[i].flags |= AVINDEX_DISCARD_FRAME;
8271 FFStream *sti = NULL;
8282 sti = ffstream(st);
8289 if (sti->nb_index_entries) {
8291 AVIndexEntry *sample = &sti->index_entries[0];
8304 for (int i = 0; i < sti->nb_index_entries; i++) {
8305 AVIndexEntry *sample = &sti->index_entries[i];
8306 int64_t end = i+1 < sti->nb_index_entries ? sti->index_entries[i+1].timestamp : st->duration;
8375 FFStream *const sti = ffstream(st);
8380 if (!sti->nb_index_entries)
8383 avio_seek(sc->pb, sti->index_entries->pos, SEEK_SET);
8401 FFStream *const sti = ffstream(st);
8409 if (!sti->nb_index_entries)
8415 avio_seek(sc->pb, sti->index_entries->pos, SEEK_SET);
8761 FFStream *const sti = ffstream(st);
8766 sti->skip_samples = sc->start_pad;
8785 sti->need_parsing = AVSTREAM_PARSE_FULL;
9235 FFStream *const sti = ffstream(st);
9244 key_sample_dts = sti->index_entries[sample].timestamp;
9261 FFStream *const sti = ffstream(st);
9276 if (sample < 0 && sti->nb_index_entries && timestamp < sti->index_entries[0].timestamp)
9323 FFStream *const sti = ffstream(st);
9324 int64_t first_ts = sti->index_entries[0].timestamp;
9325 int64_t ts = sti->index_entries[sample].timestamp;
9341 FFStream *sti;
9349 sti = ffstream(st);
9356 int64_t seek_timestamp = sti->index_entries[sample].timestamp;
9357 sti->skip_samples = mov_get_skip_samples(st, sample);
9361 FFStream *const sti = ffstream(st);
9370 sti->skip_samples = mov_get_skip_samples(st, sample);