1
mirror of https://github.com/mpv-player/mpv synced 2024-07-27 17:48:22 +02: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:
eugeni 2006-11-13 16:49:32 +00:00
parent 4a27cb5876
commit 656bde87fa

View File

@ -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