]> git.sesse.net Git - ffmpeg/commit
lavf/jacosubdec: compute subtitle duration correctly
authorAdam Sampson <ats@offog.org>
Tue, 19 Feb 2019 09:20:31 +0000 (09:20 +0000)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 20 Feb 2019 20:15:07 +0000 (21:15 +0100)
commitbfa33f548db853bb4fef88df93b7c7829fe3d981
tree2abc69dcc7d4e8545b708710f84fbb461216153e
parent1811b7d1f5330e04a48b1d6425cf1ef6ed776ed1
lavf/jacosubdec: compute subtitle duration correctly

When a JACOsub subtitle has two timestamps, they represent its start and
end times (http://unicorn.us.com/jacosub/jscripts.html#l_times); the
duration is the difference between the two, not the sum of the two.

The subtitle end times in the FATE test for this were wrong as a result;
fix them too. (This test is based on JACOsub's demo.txt, and the end
time computed for the last line using @ now matches what the comments
there say it should be.)

Also tested in practice using MPV, a LaserDisc, and some authentic 1993
JACOsub files.

Signed-off-by: Adam Sampson <ats@offog.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/jacosubdec.c
tests/ref/fate/sub-jacosub