comparison 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
comparison
equal deleted inserted replaced
25745:0d516e7d404e 25746:330af0160c2d
1293 && queue->packets[queue->current_index].pts100 <= pts100) { 1293 && queue->packets[queue->current_index].pts100 <= pts100) {
1294 lastpts = queue->packets[queue->current_index].pts100; 1294 lastpts = queue->packets[queue->current_index].pts100;
1295 ++queue->current_index; 1295 ++queue->current_index;
1296 ++reseek_count; 1296 ++reseek_count;
1297 } 1297 }
1298 while (reseek_count--) { 1298 while (reseek_count-- && --queue->current_index) {
1299 --queue->current_index;
1300 if (queue->packets[queue->current_index-1].pts100 != UINT_MAX && 1299 if (queue->packets[queue->current_index-1].pts100 != UINT_MAX &&
1301 queue->packets[queue->current_index-1].pts100 != lastpts) 1300 queue->packets[queue->current_index-1].pts100 != lastpts)
1302 break; 1301 break;
1303 } 1302 }
1304 1303