changeset 25119:2e0a71d7c89f

Check boundary for queue's current_index.
author ulion
date Fri, 23 Nov 2007 13:17:36 +0000
parents 0c129372fd59
children 9b4ca4dc1294
files vobsub.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vobsub.c	Fri Nov 23 12:01:13 2007 +0000
+++ b/vobsub.c	Fri Nov 23 13:17:36 2007 +0000
@@ -1280,7 +1280,8 @@
 	    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;