diff mplayer.c @ 31227:ee7beb1a3a6e

backport ass_flush_events() from upstream libass and make use of it This fixes subtitles duplication when seeking back in ass stream formated with the "standard" format FFmpeg uses.
author aurel
date Mon, 31 May 2010 19:10:57 +0000
parents 203789464176
children 7567de05a9db
line wrap: on
line diff
--- a/mplayer.c	Mon May 31 17:12:27 2010 +0000
+++ b/mplayer.c	Mon May 31 19:10:57 2010 +0000
@@ -2581,6 +2581,11 @@
 	vobsub_seek(vo_vobsub, mpctx->sh_video->pts);
     }
 
+#ifdef CONFIG_ASS
+    if (ass_enabled && mpctx->d_sub->sh && ((sh_sub_t *)mpctx->d_sub->sh)->ass_track)
+        ass_flush_events(((sh_sub_t *)mpctx->d_sub->sh)->ass_track);
+#endif
+
     edl_seek_reset(mpctx);
 
     c_total = 0;