mirror of
https://github.com/mpv-player/mpv
synced 2025-01-13 18:45:25 +00:00
Support \t with acceleration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20891 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4a27cb5876
commit
656bde87fa
@ -906,12 +906,14 @@ static char* parse_tag(char* p, double pwr) {
|
||||
t1 = v1;
|
||||
t2 = v2;
|
||||
delta_t = v2 - v1;
|
||||
if (v3 < 0.)
|
||||
v3 = 0.;
|
||||
t = frame_context.time - render_context.event->Start; // FIXME: move to render_context
|
||||
if (t < t1)
|
||||
k = 0.;
|
||||
else if (t > t2)
|
||||
k = 1.;
|
||||
else k = ((double)(t - t1)) / delta_t;
|
||||
else k = pow(((double)(t - t1)) / delta_t, v3);
|
||||
while (*p == '\\')
|
||||
p = parse_tag(p, k); // maybe k*pwr ? no, specs forbid nested \t's
|
||||
skip_all(')'); // FIXME: better skip(')'), but much more tags support required
|
||||
|
Loading…
Reference in New Issue
Block a user