Mercurial > mplayer.hg
diff vobsub.c @ 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 | 6ad285d014bf |
children | 5448bd27b954 |
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;