movenc: Don't assume that fragment durations in pts is equal to duration in dts
authorMartin Storsjö <martin@martin.st>
Sun, 15 Mar 2015 21:57:06 +0000 (23:57 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 19 Mar 2015 08:27:20 +0000 (10:27 +0200)
commit67a2912307c3c08f2725ccae162cfe3426b80184
treebe649cd0725e2a1aaa53e0a6f104f871845354dc
parent5c337353a2546416631a87de4881850d99141c39
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>
libavformat/movenc.c
libavformat/movenc.h