]> git.sesse.net Git - ffmpeg/commit
avformat/concatdec: always re-calculate start time and duration
authorMarton Balint <cus@passwd.hu>
Wed, 21 Nov 2018 23:59:45 +0000 (00:59 +0100)
committerMarton Balint <cus@passwd.hu>
Tue, 22 Jan 2019 19:14:11 +0000 (20:14 +0100)
commit1b126ec4087ab5d87d413116bee666495b0d2d3e
treebe795a137ff26f20278233f2ce5010256fec4616
parent679cbd8f18719f470f7107ed0a7fbef1905ee85a
avformat/concatdec: always re-calculate start time and duration

This allows the underlying files to change their duration on subsequent
avformat context opens.

An example use case where this matters:

ffconcat version 1.0
file dummy.mxf
file dummy.mxf

ffmpeg -re -stream_loop -1 -i dummy.ffconcat -f sdl2 none

The user can seamlessly change the input by atomically replacing dummy.mxf.

v2: Set ConcatFile duration in read_header for all segments with known
durations because from now on we always recalculate the start time in
open_file, and an instant seek could have caused unset ConcatFile durations.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/concatdec.c