changed chunkid/size check

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1465 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-08-08 15:20:40 +00:00
parent 2e588cdade
commit c5dbf8a807
1 changed files with 12 additions and 8 deletions

View File

@ -194,15 +194,17 @@ do{
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 @@ do{
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;