changeset 25746:330af0160c2d

Fix code to prevent from accessing queue->packets[-1].pts that causes a crash. Found and patched by Reimar.
author ulion
date Thu, 17 Jan 2008 02:18:49 +0000
parents 0d516e7d404e
children 12970064a271
files vobsub.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vobsub.c	Wed Jan 16 20:36:01 2008 +0000
+++ b/vobsub.c	Thu Jan 17 02:18:49 2008 +0000
@@ -1295,8 +1295,7 @@
       ++queue->current_index;
       ++reseek_count;
     }
-    while (reseek_count--) {
-      --queue->current_index;
+    while (reseek_count-- && --queue->current_index) {
       if (queue->packets[queue->current_index-1].pts100 != UINT_MAX &&
           queue->packets[queue->current_index-1].pts100 != lastpts)
         break;