[MPlayer-dev-eng] mov demuxer goes into infinite loop

Fredrik Kuivinen freku045 at student.liu.se
Thu Mar 21 14:00:19 CET 2002


Hi

I have uploaded a sample file
(ftp://mplayerhq.hu/MPlayer/incoming/mov-demux-infinite-loop.mpg yes it is a
mpg file.) which have a lot of zeroes in the beginning. This causes the mov
demuxer to go into a infinite loop. I have made a patch that works for me but
I don't know if it is the correct thing to do. Someone who knows more about the
mov demuxer should have a look.

/ Fredrik

-------------- next part --------------
Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.43
diff -u -3 -p -r1.43 demux_mov.c
--- demux_mov.c	21 Mar 2002 06:05:14 -0000	1.43
+++ demux_mov.c	21 Mar 2002 13:04:00 -0000
@@ -229,11 +229,6 @@ int mov_check_file(demuxer_t* demuxer){
 #endif
 	    skipped += 8;
 	}
-	else if (len == 0) /* deleted chunk */
-	{
-	    /* XXX: CJB! is this right? - alex */
-	    goto skip_chunk;
-	}
 	else if(len<8) break; // invalid chunk
 
 	switch(id){
@@ -266,7 +261,6 @@ int mov_check_file(demuxer_t* demuxer){
 	  id = be2me_32(id);
 	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",&id,(int)len);
 	}
-skip_chunk:
 	if(!stream_skip(demuxer->stream,len-skipped)) break;
 	++no;
     }


More information about the MPlayer-dev-eng mailing list