movenc: Don't assume that fragment durations in pts is equal to duration in dts

For strict CFR, they should be pretty much equal, but if the stream
is VFR, there can be a sometimes significant difference.

Calculate the pts duration separately, used in sidx atoms and for
tfrf/tfxd boxes in smooth streaming ismv files.

Also make sure to reduce the duration of sidx entries according to
edit lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2015-03-15 23:57:06 +02:00
parent 5c337353a2
commit 67a2912307
2 changed files with 25 additions and 9 deletions

View File

@@ -105,6 +105,7 @@ typedef struct MOVTrack {
int tref_id; ///< trackID of the referenced track
int64_t start_dts;
int64_t start_cts;
int64_t end_pts;
int hint_track; ///< the track that hints this track, -1 if no hint track is set
int src_track; ///< the track that this hint track describes