Lines Matching defs:dts
1147 next_dts = track->cluster[cluster_idx + 1].dts;
1149 next_dts -= track->cluster[cluster_idx].dts;
3607 if (start_dts != track->cluster[0].dts || start_ct != track->cluster[0].cts) {
3610 "EDTS using dts:%"PRId64" cts:%d instead of dts:%"PRId64" cts:%"PRId64" tid:%d\n",
3611 track->cluster[0].dts, track->cluster[0].cts,
3613 start_dts = track->cluster[0].dts;
3652 * here, but use FFMIN in case dts is a small positive integer
3658 * dts<0 pts=0. */
3860 else if ((track->entry && track->cluster[0].dts) || track->mode == MODE_PSP || is_clcp_track(track))
5287 avio_wb64(pb, track->cluster[0].dts + track->cluster[0].cts);
5289 (track->cluster[0].dts + track->cluster[0].cts));
5366 info->time = track->cluster[0].dts + track->cluster[0].cts;
5368 (track->cluster[0].dts + track->cluster[0].cts);
5404 avio_wb64(pb, track->cluster[0].dts - track->start_dts);
5480 presentation_time = track->cluster[0].dts + track->cluster[0].cts -
5483 (track->cluster[0].dts + track->cluster[0].cts);
6181 int64_t offset, dts, pts;
6184 dts = pkt->dts + offset;
6186 dts += track->dts_shift;
6187 track->track_duration = dts - track->start_dts;
6191 track->end_pts = dts;
6200 // Sample durations are calculated as the diff of dts values,
6201 // but for the last sample in a fragment, we don't know the dts
6208 // Use the duration (i.e. dts diff) of the second last sample for
6311 av_rescale(mov->tracks[first_track].cluster[0].dts, AV_TIME_BASE, mov->tracks[first_track].timescale),
6385 ref = trk->cluster[trk->entry - 1].dts;
6390 ref = pkt->dts; // Skip tests for the first packet
6398 duration = pkt->dts - ref;
6399 if (pkt->dts < ref || duration >= INT_MAX) {
6400 av_log(s, AV_LOG_WARNING, "Packet duration: %"PRId64" / dts: %"PRId64" is out of range\n",
6401 duration, pkt->dts);
6403 pkt->dts = ref + 1;
6635 trk->cluster[trk->entry].dts = pkt->dts;
6642 * which might not exactly match our dts. Therefore adjust the dts
6644 trk->cluster[trk->entry].dts = trk->start_dts + trk->track_duration;
6653 pkt->pts = pkt->dts + trk->end_pts - trk->cluster[trk->entry].dts;
6657 * pkt->dts - trk->start_dts. */
6670 trk->cluster[trk->entry].dts = trk->start_dts = 0;
6673 trk->start_dts = pkt->dts;
6679 trk->start_dts = pkt->dts - pkt->pts;
6681 /* Pretend the whole stream started at dts=0, with earlier fragments
6682 * already written, with a duration summing up to pkt->dts. */
6686 } else if (pkt->dts && mov->moov_written)
6688 "Track %d starts with a nonzero dts %"PRId64", while the moov "
6691 pkt->stream_index, pkt->dts);
6693 trk->track_duration = pkt->dts - trk->start_dts + pkt->duration;
6698 pkt->pts = pkt->dts;
6700 if (pkt->dts != pkt->pts)
6702 trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
6705 trk->start_cts = pkt->pts - pkt->dts;
6707 trk->end_pts = trk->cluster[trk->entry].dts +
6710 trk->end_pts = FFMAX(trk->end_pts, trk->cluster[trk->entry].dts +
6786 trk->dts_shift = pkt->pts - pkt->dts;
6787 pkt->dts += trk->dts_shift;
6811 trk->start_dts = pkt->dts;
6813 trk->start_cts = pkt->pts - pkt->dts;
6822 frag_duration = av_rescale_q(pkt->dts - trk->cluster[0].dts,
6841 trk->track_duration = pkt->dts - trk->start_dts;
6845 trk->end_pts = pkt->dts;
6857 int64_t dts) {
6865 end->pts = dts;
6866 end->dts = dts;
6912 * dts == 0, which is rarely true for subtitles. So, as soon
6913 * as we see any packet with dts > 0, write an empty subtitle
6914 * at dts == 0 for any subtitle track with no samples in it.
6917 * dts is past the duration of the last subtitle sample. If
6932 trk->track_duration < pkt->dts &&
7058 pkt->pts = pkt->dts = av_rescale_q(c->start, c->time_base, (AVRational){1,mov->movie_timescale});
7059 pkt->duration = end - pkt->dts;
7129 pkt->pts = pkt->dts = av_rescale_q(tc.start, av_inv_q(rate), (AVRational){1,mov->movie_timescale});