mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 04:45:33 +00:00
Fix division by zero in "\t" parsing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23151 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7b5e1f8939
commit
13156cd794
@ -929,11 +929,14 @@ static char* parse_tag(char* p, double pwr) {
|
||||
if (v3 < 0.)
|
||||
v3 = 0.;
|
||||
t = frame_context.time - render_context.event->Start; // FIXME: move to render_context
|
||||
if (t < t1)
|
||||
if (t <= t1)
|
||||
k = 0.;
|
||||
else if (t > t2)
|
||||
else if (t >= t2)
|
||||
k = 1.;
|
||||
else k = pow(((double)(t - t1)) / delta_t, v3);
|
||||
else {
|
||||
assert(delta_t != 0.);
|
||||
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