mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 06:46:55 +00:00
corrects an off-by-one error when trying to seek beyond the end of file.
patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7003 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
09cbf2a378
commit
99d4526691
@ -594,7 +594,7 @@ void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){
|
||||
// find nearest video keyframe chunk pos:
|
||||
if(rel_seek_frames>0){
|
||||
// seek forward
|
||||
while(video_chunk_pos<priv->idx_size){
|
||||
while(video_chunk_pos<priv->idx_size-1){
|
||||
int id=((AVIINDEXENTRY *)priv->idx)[video_chunk_pos].ckid;
|
||||
if(avi_stream_id(id)==d_video->id){ // video frame
|
||||
if((--rel_seek_frames)<0 && ((AVIINDEXENTRY *)priv->idx)[video_chunk_pos].dwFlags&AVIIF_KEYFRAME) break;
|
||||
|
Loading…
Reference in New Issue
Block a user