Fix code to prevent from accessing queue->packets[-1].pts that causes a crash.

Found and patched by Reimar.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25774 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ulion 2008-01-17 02:18:49 +00:00
parent da44633714
commit 969bc9cb89
1 changed files with 1 additions and 2 deletions

View File

@ -1295,8 +1295,7 @@ vobsub_get_packet(void *vobhandle, float pts,void** data, int* timestamp) {
++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;