[MPlayer-dev-eng] [PATCH] demux_mov.c standard c

Alexander Gottwald Alexander.Gottwald at s1999.tu-chemnitz.de
Sat Nov 23 18:17:48 CET 2002


Some changes in demux_mov.c broke compiling with compiler which expect
declaration of variables before the first statement. The patch fixes 
this.

Index: libmpdemux/demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.83
diff -u -r1.83 demux_mov.c
--- libmpdemux/demux_mov.c	23 Nov 2002 10:58:08 -0000	1.83
+++ libmpdemux/demux_mov.c	23 Nov 2002 17:41:36 -0000
@@ -527,10 +527,11 @@
 		break;
 	    }
 	    case MOV_FOURCC('s','t','t','s'): {
-		stream_read_dword(demuxer->stream);
-		int len=stream_read_dword(demuxer->stream);
+		int len;
 		int i;
 		unsigned int pts=0;
+		stream_read_dword(demuxer->stream);
+		len = stream_read_dword(demuxer->stream);
 		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample duration table! (%d blocks)\n",level,"",len);
 		trak->durmap=malloc(sizeof(mov_durmap_t)*len);
 		memset(trak->durmap,0,sizeof(mov_durmap_t)*len);
@@ -582,9 +583,10 @@
 		break;
 	    }
 	    case MOV_FOURCC('s','t','c','o'): {
-		stream_read_dword(demuxer->stream);
-		int len=stream_read_dword(demuxer->stream);
+		int len;
 		int i;
+		stream_read_dword(demuxer->stream);
+		len = stream_read_dword(demuxer->stream);
 		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sChunk offset table! (%d chunks)\n",level,"",len);
 		// extend array if needed:
 		if(len>trak->chunks_size){
@@ -596,9 +598,10 @@
 		break;
 	    }
 	    case MOV_FOURCC('c','o','6','4'): {
-		stream_read_dword(demuxer->stream);
-		int len=stream_read_dword(demuxer->stream);
+		int len;
 		int i;
+		stream_read_dword(demuxer->stream);
+		len = stream_read_dword(demuxer->stream);
 		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*s64bit chunk offset table! (%d chunks)\n",level,"",len);
 		// extend array if needed:
 		if(len>trak->chunks_size){

bye
    ago

NP: Funker Vogt - Take Care! [US Remix]*
-- 
 Alexander.Gottwald at informatik.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723




More information about the MPlayer-dev-eng mailing list