# HG changeset patch # User arpi # Date 1003884654 0 # Node ID 022a7e7fec2dee52117d28822c2f97204d3547ba # Parent 561a7b13220a39eaac69e7b58a1ba54b350f7485 while_encoding.avi (ffmpeg) fix (ignoring movi_ check if end<=start) diff -r 561a7b13220a -r 022a7e7fec2d libmpdemux/demux_avi.c --- a/libmpdemux/demux_avi.c Wed Oct 24 00:25:52 2001 +0000 +++ b/libmpdemux/demux_avi.c Wed Oct 24 00:50:54 2001 +0000 @@ -192,7 +192,7 @@ } pos=idx->dwChunkOffset+priv->idx_offset; - if(posmovi_start || pos>=demux->movi_end){ + if((posmovi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start)){ mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range! idx=0x%X \n",pos); continue; } @@ -224,7 +224,7 @@ if(idx->dwFlags&AVIIF_KEYFRAME) flags=1; } else { demux->filepos=stream_tell(demux->stream); - if(demux->filepos>=demux->movi_end){ + if(demux->filepos>=demux->movi_end && demux->movi_end>demux->movi_start){ demux->stream->eof=1; return 0; } @@ -284,7 +284,7 @@ } pos=idx->dwChunkOffset+priv->idx_offset; - if(posmovi_start || pos>=demux->movi_end){ + if((posmovi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start)){ mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range! current=0x%X idx=0x%X \n",demux->filepos,pos); continue; } @@ -347,7 +347,7 @@ do{ demux->filepos=stream_tell(demux->stream); - if(demux->filepos>=demux->movi_end){ + if(demux->filepos>=demux->movi_end && (demux->movi_end>demux->movi_start)){ demux->stream->eof=1; return 0; }