[Mplayer-cvslog] CVS: main aviheader.c,1.17,1.18
Arpi of Ize
arpi at mplayer.dev.hu
Fri Jul 27 03:16:56 CEST 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv5844
Modified Files:
aviheader.c
Log Message:
trying to fix -idx problem
Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/aviheader.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- aviheader.c 19 Jul 2001 15:15:21 -0000 1.17
+++ aviheader.c 27 Jul 2001 01:16:54 -0000 1.18
@@ -158,6 +158,7 @@
stream_seek(demuxer->stream,demuxer->movi_start);
demuxer->idx_pos=0;
+ demuxer->idx_size=0;
demuxer->idx=NULL;
while(1){
@@ -173,8 +174,11 @@
continue;
}
if(stream_eof(demuxer->stream)) break;
+ if(!id || avi_stream_id(id)==100) goto skip_chunk; // bad ID (or padding?)
+
if(demuxer->idx_pos<=demuxer->idx_size){
- demuxer->idx_size+=32;
+// demuxer->idx_size+=32;
+ demuxer->idx_size+=1024; // +16kB
demuxer->idx=realloc(demuxer->idx,demuxer->idx_size*sizeof(AVIINDEXENTRY));
if(!demuxer->idx){demuxer->idx_pos=0; break;} // error!
}
@@ -202,6 +206,7 @@
printf("\n");
}
#endif
+skip_chunk:
skip=(len+1)&(~1); // total bytes in this chunk
stream_seek(demuxer->stream,8+demuxer->filepos+skip);
}
More information about the MPlayer-cvslog
mailing list