summaryrefslogtreecommitdiffstats
path: root/mpcommon.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-12-29 23:57:14 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-12-29 23:57:14 +0200
commit67b40bd21988fed2f70b1c4f5aea301b28f78298 (patch)
treed68ea94ae2d712cb2e991496049bc13f19d9ea60 /mpcommon.c
parent9fe4f647824b8067ea4e4f6cf7f699e6c8fa67cb (diff)
parentf97fd3eff02bd1048750f350230d9e9192ea3dfd (diff)
downloadmpv-67b40bd21988fed2f70b1c4f5aea301b28f78298.tar.bz2
mpv-67b40bd21988fed2f70b1c4f5aea301b28f78298.tar.xz
Merge svn changes up to r30065
Diffstat (limited to 'mpcommon.c')
-rw-r--r--mpcommon.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mpcommon.c b/mpcommon.c
index 456b6e9ee7..4088aada6d 100644
--- a/mpcommon.c
+++ b/mpcommon.c
@@ -199,12 +199,13 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts,
(long long)((endpts-subpts)*1000 + 0.5));
} else { // plaintext subs with libass
if (subpts != MP_NOPTS_VALUE) {
+ subtitle tmp_subs = {0};
if (endpts == MP_NOPTS_VALUE) endpts = subpts + 3;
- sub_clear_text(&subs, MP_NOPTS_VALUE);
- sub_add_text(&subs, packet, len, endpts);
- subs.start = subpts * 100;
- subs.end = endpts * 100;
- ass_process_subtitle(ass_track, &subs);
+ sub_add_text(&tmp_subs, packet, len, endpts);
+ tmp_subs.start = subpts * 100;
+ tmp_subs.end = endpts * 100;
+ ass_process_subtitle(ass_track, &tmp_subs);
+ sub_clear_text(&tmp_subs, MP_NOPTS_VALUE);
}
}
continue;