summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-07 01:13:11 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-07 01:13:11 +0000
commit98c80613c6ee599926d9aeabcaa433d8e634abf9 (patch)
tree7697a36f1e9e14224482c1565f9286db520094a7 /libass
parent4fdc9591b4c176098f0388198389ce5b74bb5fee (diff)
downloadmpv-98c80613c6ee599926d9aeabcaa433d8e634abf9.tar.bz2
mpv-98c80613c6ee599926d9aeabcaa433d8e634abf9.tar.xz
In case of several \move or \pos in one line, prefer the first one.
Patch by Grigori G, greg at chown ath cx. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28473 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_render.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index d41878b69e..afd6e8f2fa 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -813,10 +813,12 @@ static char* parse_tag(char* p, double pwr) {
else k = ((double)(t - t1)) / delta_t;
x = k * (x2 - x1) + x1;
y = k * (y2 - y1) + y1;
- render_context.pos_x = x;
- render_context.pos_y = y;
- render_context.detect_collisions = 0;
- render_context.evt_type = EVENT_POSITIONED;
+ if (render_context.evt_type != EVENT_POSITIONED) {
+ render_context.pos_x = x;
+ render_context.pos_y = y;
+ render_context.detect_collisions = 0;
+ render_context.evt_type = EVENT_POSITIONED;
+ }
} else if (mystrcmp(&p, "frx")) {
double val;
if (mystrtod(&p, &val)) {
@@ -892,10 +894,12 @@ static char* parse_tag(char* p, double pwr) {
v2 = strtol(p, &p, 10);
skip(')');
mp_msg(MSGT_ASS, MSGL_DBG2, "pos(%d, %d)\n", v1, v2);
- render_context.evt_type = EVENT_POSITIONED;
- render_context.detect_collisions = 0;
- render_context.pos_x = v1;
- render_context.pos_y = v2;
+ if (render_context.evt_type != EVENT_POSITIONED) {
+ render_context.evt_type = EVENT_POSITIONED;
+ render_context.detect_collisions = 0;
+ render_context.pos_x = v1;
+ render_context.pos_y = v2;
+ }
} else if (mystrcmp(&p, "fad")) {
int a1, a2, a3;
long long t1, t2, t3, t4;