# HG changeset patch # User ulion # Date 1200536329 0 # Node ID 330af0160c2d42834802e4088f6009d85c5aa129 # Parent 0d516e7d404e0f1043d4637ab41ef1cca3c373bb Fix code to prevent from accessing queue->packets[-1].pts that causes a crash. Found and patched by Reimar. diff -r 0d516e7d404e -r 330af0160c2d vobsub.c --- 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;