Mercurial > mplayer.hg
comparison libass/ass.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 | 48d020c5ceca |
children | e64df5862cea |
comparison
equal
deleted
inserted
replaced
31226:1f607394598a | 31227:ee7beb1a3a6e |
---|---|
907 ass_free_event(track, eid); | 907 ass_free_event(track, eid); |
908 track->n_events--; | 908 track->n_events--; |
909 free(str); | 909 free(str); |
910 } | 910 } |
911 | 911 |
912 /** | |
913 * \brief Flush buffered events. | |
914 * \param track track | |
915 */ | |
916 void ass_flush_events(ASS_Track *track) | |
917 { | |
918 if (track->events) { | |
919 int eid; | |
920 for (eid = 0; eid < track->n_events; eid++) | |
921 ass_free_event(track, eid); | |
922 track->n_events = 0; | |
923 } | |
924 } | |
925 | |
912 #ifdef CONFIG_ICONV | 926 #ifdef CONFIG_ICONV |
913 /** \brief recode buffer to utf-8 | 927 /** \brief recode buffer to utf-8 |
914 * constraint: codepage != 0 | 928 * constraint: codepage != 0 |
915 * \param data pointer to text buffer | 929 * \param data pointer to text buffer |
916 * \param size buffer size | 930 * \param size buffer size |