movenc: Write durations based on pts into mvhd/mdhd/tkhd/elst
authorMartin Storsjö <martin@martin.st>
Fri, 13 Dec 2019 23:00:20 +0000 (01:00 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 10 Jan 2020 07:14:00 +0000 (09:14 +0200)
commit3d894db700cc1e360a7a75ab9ac8bf67ac6670a3
tree5a97eab00ee47ade30d15a9da9d6c3486245c459
parent3ea705767720033754e8d85566460390191ae27d
movenc: Write durations based on pts into mvhd/mdhd/tkhd/elst

Keep all the existing data fields as they are (there's lots and
lots of nontrivial calculation and heuristics based on them in
their current form), but derive the duration as the difference
between the pts of the first packet to the maximum pts+duration
(not necessarily the last packet); use this duration in any box
where the actual presentation duration is supposed to be.

Fixes: 8420

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/movenc.c