# HG changeset patch # User uau # Date 1191465334 0 # Node ID 9aab9d7b51f0bef33b161688f23c9d19568352fc # Parent 9f81c217580399bb3af9c280b98dba03260ff579 Fix missing subtitles after seeking back Subtitle packets that had been demuxed but whose start time had not yet been reached were left in the demuxer stream after seeking. When using the default (non-libass) subtitle rendering this could block subtitles from appearing as long as the playback position stayed below the original one before seek. External subtitle files were not affected. Fixed by making seek code free all packets from the subtitle stream. diff -r 9f81c2175803 -r 9aab9d7b51f0 libmpdemux/demuxer.c --- a/libmpdemux/demuxer.c Wed Oct 03 23:50:54 2007 +0000 +++ b/libmpdemux/demuxer.c Thu Oct 04 02:35:34 2007 +0000 @@ -930,6 +930,7 @@ // clear demux buffers: if(sh_audio){ ds_free_packs(d_audio);sh_audio->a_buffer_len=0;} ds_free_packs(d_video); + ds_free_packs(demuxer->sub); demuxer->stream->eof=0; // clear eof flag demuxer->video->eof=0;