[MPlayer-cvslog] r25774 - trunk/vobsub.c

ulion subversion at mplayerhq.hu
Thu Jan 17 03:18:49 CET 2008


Author: ulion
Date: Thu Jan 17 03:18:49 2008
New Revision: 25774

Log:
Fix code to prevent from accessing queue->packets[-1].pts that causes a crash.
Found and patched by Reimar.


Modified:
   trunk/vobsub.c

Modified: trunk/vobsub.c
==============================================================================
--- trunk/vobsub.c	(original)
+++ trunk/vobsub.c	Thu Jan 17 03:18:49 2008
@@ -1295,8 +1295,7 @@ vobsub_get_packet(void *vobhandle, float
       ++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;



More information about the MPlayer-cvslog mailing list