# HG changeset patch # User eugeni # Date 1218226082 0 # Node ID 33b9d3402d3e924c79666c182ed1ceaecd8ec29e # Parent e2de111091394a34cab37f2c1300b59744b14c56 Don't print drawing commands on screen. Drawing mode is not implemented in libass. diff -r e2de11109139 -r 33b9d3402d3e libass/ass_render.c --- a/libass/ass_render.c Thu Aug 07 22:20:58 2008 +0000 +++ b/libass/ass_render.c Fri Aug 08 20:08:02 2008 +0000 @@ -161,6 +161,7 @@ uint32_t fade; // alpha from \fad char be; // blur edges int shadow; + int drawing_mode; // not implemented; when != 0 text is discarded, except for style override tags effect_t effect_type; int effect_timing; @@ -1028,6 +1029,13 @@ render_context.shadow = val; else render_context.shadow = render_context.style->Shadow; + } else if (mystrcmp(&p, "pbo")) { + (void)strtol(p, &p, 10); // ignored + } else if (mystrcmp(&p, "p")) { + int val; + if (!mystrtoi(&p, 10, &val)) + val = 0; + render_context.drawing_mode = !!val; } return p; @@ -1203,6 +1211,7 @@ render_context.clip_y1 = frame_context.track->PlayResY; render_context.detect_collisions = 1; render_context.fade = 0; + render_context.drawing_mode = 0; render_context.effect_type = EF_NONE; render_context.effect_timing = 0; render_context.effect_skip_timing = 0; @@ -1750,7 +1759,9 @@ while (1) { // get next char, executing style override // this affects render_context - code = get_next_char(&p); + do { + code = get_next_char(&p); + } while (code && render_context.drawing_mode); // skip everything in drawing mode // face could have been changed in get_next_char if (!render_context.font) {