mirror of https://github.com/mpv-player/mpv
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:
parent
da44633714
commit
969bc9cb89
3
vobsub.c
3
vobsub.c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue