Recalculate line.duration in retime() and add "line" as a mode.

Originally committed to SVN as r1552.
This commit is contained in:
Niels Martin Hansen 2007-09-03 13:28:40 +00:00
parent c5a91a11fe
commit 62ded21ece

View file

@ -282,6 +282,9 @@ function apply_templates(meta, styles, subs, templates)
elseif mode == "postsyl" then
newstart = line.start_time + syl.end_time + addstart
newend = line.start_time + syl.end_time + addend
elseif mode == "line" then
newstart = line.start_time + addstart
newend = line.end_time + addend
elseif mode == "preline" then
newstart = line.start_time + addstart
newend = line.start_time + addend
@ -306,6 +309,7 @@ function apply_templates(meta, styles, subs, templates)
end
line.start_time = newstart
line.end_time = newend
line.duration = newend - newstart
return ""
end
tenv.fxgroup = {}