mirror of https://github.com/mpv-player/mpv
changed chunkid/size check
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1465 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2e588cdade
commit
c5dbf8a807
20
demux_avi.c
20
demux_avi.c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue