diff options
author | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-17 02:18:49 +0000 |
---|---|---|
committer | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-17 02:18:49 +0000 |
commit | 969bc9cb89d22d9ed21a355c209a94f65eff67cf (patch) | |
tree | 395122120059f3e15d25f8f4fd43f0bbad8f042c /vobsub.c | |
parent | da446337145dd0f72d339eaee042aef15b31480e (diff) | |
download | mpv-969bc9cb89d22d9ed21a355c209a94f65eff67cf.tar.bz2 mpv-969bc9cb89d22d9ed21a355c209a94f65eff67cf.tar.xz |
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
Diffstat (limited to 'vobsub.c')
-rw-r--r-- | vobsub.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |