Mercurial > mplayer.hg
changeset 23133:0574817cc6cb
Fix division by zero in "\t" parsing.
author | eugeni |
---|---|
date | Fri, 27 Apr 2007 14:18:44 +0000 |
parents | d5db3f1f79b1 |
children | 1de2a46a0987 |
files | libass/ass_render.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libass/ass_render.c Fri Apr 27 10:16:25 2007 +0000 +++ b/libass/ass_render.c Fri Apr 27 14:18:44 2007 +0000 @@ -929,11 +929,14 @@ 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