small fix of DivFix

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@570 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi_esp 2001-04-22 01:29:59 +00:00
parent 9eb56bf2ee
commit f7d5134c02
1 changed files with 5 additions and 4 deletions

View File

@ -121,6 +121,7 @@ if(index_mode>=2 || (avi_header.idx_size==0 && index_mode==1)){
while(1){
int id,len,skip;
AVIINDEXENTRY* idx;
unsigned char c;
demuxer->filepos=stream_tell(demuxer->stream);
if(demuxer->filepos>=avi_header.movi_end) break;
id=stream_read_dword_le(demuxer->stream);
@ -140,16 +141,16 @@ if(index_mode>=2 || (avi_header.idx_size==0 && index_mode==1)){
idx->dwFlags=AVIIF_KEYFRAME; // FIXME
idx->dwChunkOffset=demuxer->filepos;
idx->dwChunkLength=len;
c=stream_read_char(demuxer->stream);
// Fix keyframes for DivX files:
if(idxfix_divx)
if(avi_stream_id(id)==idxfix_videostream){
unsigned char c=stream_read_char(demuxer->stream);
// --skip;
if(!(c&0x40)) idx->dwFlags=0;
if(c&0x40) idx->dwFlags=0;
}
if(verbose>=2) printf("0x%08X 0x%08X %.4s %X\n",demuxer->filepos,id,&id,idx->dwFlags);
if(verbose>=2) printf("%08X %08X %.4s %02X %X\n",demuxer->filepos,id,&id,c,idx->dwFlags);
#if 0
{ unsigned char tmp[64];
int i;