[Mplayer-cvslog] CVS: main/libmpdemux demux_avi.c,1.43,1.44

Arpi of Ize arpi at mplayerhq.hu
Wed Aug 14 23:25:14 CEST 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv11804

Modified Files:
	demux_avi.c 
Log Message:
corrects an off-by-one error when trying to seek beyond the end of file.
patch by Jindrich Makovicka <makovick at kmlinux.fjfi.cvut.cz>


Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_avi.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- demux_avi.c	4 Aug 2002 01:48:35 -0000	1.43
+++ demux_avi.c	14 Aug 2002 21:25:01 -0000	1.44
@@ -594,7 +594,7 @@
       // 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;




More information about the MPlayer-cvslog mailing list