mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
Check boundary for queue's current_index.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25147 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5de794723e
commit
5363464d0a
3
vobsub.c
3
vobsub.c
@ -1280,7 +1280,8 @@ void vobsub_seek(void * vobhandle, float pts)
|
||||
return;
|
||||
queue = vob->spu_streams + vobsub_id;
|
||||
queue->current_index = 0;
|
||||
while ((queue->packets + queue->current_index)->pts100 < seek_pts100)
|
||||
while (queue->current_index < queue->packets_size
|
||||
&& (queue->packets + queue->current_index)->pts100 < seek_pts100)
|
||||
++queue->current_index;
|
||||
if (queue->current_index > 0)
|
||||
--queue->current_index;
|
||||
|
Loading…
Reference in New Issue
Block a user