[Mplayer-cvslog] CVS: main/libmpdemux demux_avi.c,1.55,1.56
Arpi of Ize
arpi at mplayerhq.hu
Sun Feb 2 22:32:18 CET 2003
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv15421
Modified Files:
demux_avi.c
Log Message:
- ignore movi_end if reading from stdin
- assume I-only stream if no index (buggy seekable avi is still better than non-seekable)
Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_avi.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- demux_avi.c 12 Jan 2003 19:55:59 -0000 1.55
+++ demux_avi.c 2 Feb 2003 21:32:05 -0000 1.56
@@ -182,7 +182,7 @@
demux_stream_t *ds;
do{
- int flags=0;
+ int flags=1;
AVIINDEXENTRY *idx=NULL;
#if 0
demux->filepos=stream_tell(demux->stream);
@@ -214,7 +214,7 @@
}
pos = priv->idx_offset + (unsigned long)idx->dwChunkOffset;
- if((pos<demux->movi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start)){
+ if((pos<demux->movi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start) && (demux->stream->type!=STREAMTYPE_STREAM)){
mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range! idx=0x%X \n",pos);
continue;
}
@@ -243,10 +243,10 @@
if(len>0x200000 && idx->dwChunkLength>0x200000) continue; // both values bad :(
len=choose_chunk_len(idx->dwChunkLength,len);
}
- if(idx->dwFlags&AVIIF_KEYFRAME) flags=1;
+ if(!(idx->dwFlags&AVIIF_KEYFRAME)) flags=0;
} else {
demux->filepos=stream_tell(demux->stream);
- if(demux->filepos>=demux->movi_end && demux->movi_end>demux->movi_start){
+ if(demux->filepos>=demux->movi_end && demux->movi_end>demux->movi_start && (demux->stream->type!=STREAMTYPE_STREAM)){
demux->stream->eof=1;
return 0;
}
@@ -302,7 +302,7 @@
int ret=0;
do{
- int flags=0;
+ int flags=1;
AVIINDEXENTRY *idx=NULL;
int idx_pos=0;
demux->filepos=stream_tell(demux->stream);
@@ -354,7 +354,7 @@
if(len>0x200000 && idx->dwChunkLength>0x200000) continue; // both values bad :(
len=choose_chunk_len(idx->dwChunkLength,len);
}
- if(idx->dwFlags&AVIIF_KEYFRAME) flags=1;
+ if(!(idx->dwFlags&AVIIF_KEYFRAME)) flags=0;
} else return 0;
ret=demux_avi_read_packet(demux,demux_avi_select_stream(demux,id),id,len,idx_pos,flags);
// if(!ret && priv->skip_video_frames<=0)
More information about the MPlayer-cvslog
mailing list