diff options
author | greg <greg@blackbox> | 2009-06-19 05:16:30 +0200 |
---|---|---|
committer | greg <greg@blackbox> | 2009-06-19 05:16:30 +0200 |
commit | 0a6f00a07f131a695f675c2a8f4e4635e50b2efd (patch) | |
tree | eb78b9964f26f399f169548a7c4dc6b3433b35da | |
parent | 4213f6ae3df34d6551f314122075ce58d95a09b6 (diff) | |
download | libass-0a6f00a07f131a695f675c2a8f4e4635e50b2efd.tar.bz2 libass-0a6f00a07f131a695f675c2a8f4e4635e50b2efd.tar.xz |
Warn on \pos, \move redefinitions
Optionally output a warning when a \pos or \move is redefined in a
single subtitle line.
-rw-r--r-- | libass/ass_render.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 829716c..f4f4396 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1018,7 +1018,10 @@ static char* parse_tag(char* p, double pwr) { mystrtod(&p, &v2); skip(')'); mp_msg(MSGT_ASS, MSGL_DBG2, "pos(%f, %f)\n", v1, v2); - if (render_context.evt_type != EVENT_POSITIONED) { + if (render_context.evt_type == EVENT_POSITIONED) { + mp_msg(MSGT_ASS, MSGL_V, "Subtitle has a new \\pos " + "after \\move or \\pos, ignoring\n"); + } else { render_context.evt_type = EVENT_POSITIONED; render_context.detect_collisions = 0; render_context.pos_x = v1; |