From f7d5134c02a81d30ccd8d5bd65e67b05d48e4217 Mon Sep 17 00:00:00 2001 From: arpi_esp Date: Sun, 22 Apr 2001 01:29:59 +0000 Subject: [PATCH] small fix of DivFix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@570 b3059339-0415-0410-9bf9-f77b7e298cf2 --- aviheader.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aviheader.c b/aviheader.c index 7d9de33d29..bb171c1587 100644 --- a/aviheader.c +++ b/aviheader.c @@ -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;