[Mplayer-cvslog] CVS: main demux_avi.c,1.12,1.13
Arpi of Ize
arpi at mplayer.dev.hu
Wed Aug 8 17:20:43 CEST 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv6775
Modified Files:
demux_avi.c
Log Message:
changed chunkid/size check
Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/demux_avi.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- demux_avi.c 6 Aug 2001 23:59:22 -0000 1.12
+++ demux_avi.c 8 Aug 2001 15:20:40 -0000 1.13
@@ -194,15 +194,17 @@
if(stream_eof(demux->stream)) return 0; // EOF!
if(id!=idx->ckid){
- printf("ChunkID mismatch! raw=%.4s idx=%.4s \n",(char *)&id,(char *)&idx->ckid);
- continue;
+ if(verbose) printf("ChunkID mismatch! raw=%.4s idx=%.4s \n",(char *)&id,(char *)&idx->ckid);
+ id=idx->ckid;
+// continue;
}
len=stream_read_dword_le(demux->stream);
// if((len&(~1))!=(idx->dwChunkLength&(~1))){
// if((len)!=(idx->dwChunkLength)){
if((len!=idx->dwChunkLength)&&((len+1)!=idx->dwChunkLength)){
- printf("ChunkSize mismatch! raw=%d idx=%ld \n",len,idx->dwChunkLength);
- continue;
+ if(verbose) printf("ChunkSize mismatch! raw=%d idx=%ld \n",len,idx->dwChunkLength);
+ len=idx->dwChunkLength;
+// continue;
}
if(idx->dwFlags&AVIIF_KEYFRAME) flags=1;
} else {
@@ -282,15 +284,17 @@
if(stream_eof(demux->stream)) return 0;
if(id!=idx->ckid){
- printf("ChunkID mismatch! raw=%.4s idx=%.4s \n",(char *)&id,(char *)&idx->ckid);
- continue;
+ if(verbose) printf("ChunkID mismatch! raw=%.4s idx=%.4s \n",(char *)&id,(char *)&idx->ckid);
+ id=idx->ckid;
+// continue;
}
len=stream_read_dword_le(demux->stream);
// if((len&(~1))!=(idx->dwChunkLength&(~1))){
// if((len)!=(idx->dwChunkLength)){
if((len!=idx->dwChunkLength)&&((len+1)!=idx->dwChunkLength)){
- printf("ChunkSize mismatch! raw=%d idx=%ld \n",len,idx->dwChunkLength);
- continue;
+ if(verbose) printf("ChunkSize mismatch! raw=%d idx=%ld \n",len,idx->dwChunkLength);
+ len=idx->dwChunkLength;
+// continue;
}
if(idx->dwFlags&AVIIF_KEYFRAME) flags=1;
} else return 0;
More information about the MPlayer-cvslog
mailing list