fix the crash when seek with 'unknown' subtitles, hopefully...

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11710 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
luran 2004-01-01 11:01:09 +00:00
parent 9fc389a29a
commit e3f069bf7a
1 changed files with 3 additions and 0 deletions

View File

@ -1274,6 +1274,9 @@ void vobsub_seek(void * vobhandle, float pts)
int seek_pts100 = (int)pts * 90000;
if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) {
/* do not seek if we don't know the id */
if (vobsub_get_id(vob, vobsub_id) == NULL)
return;
queue = vob->spu_streams + vobsub_id;
queue->current_index = 0;
while ((queue->packets + queue->current_index)->pts100 < seek_pts100)