[Mplayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.37,1.38

Mike Melanson melanson at mplayer.dev.hu
Fri Mar 1 04:02:28 CET 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv26497/libmpdemux

Modified Files:
	demux_mov.c 
Log Message:
fixed some endian issues, like changing bswap_32() -> be2me_32(), and
removing FIXME #warning about endianness (seems to work fine on PPC)


Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- demux_mov.c	10 Feb 2002 19:06:08 -0000	1.37
+++ demux_mov.c	1 Mar 2002 03:02:25 -0000	1.38
@@ -194,12 +194,7 @@
     mov_track_t* tracks[MOV_MAX_TRACKS];
 } mov_priv_t;
 
-#warning "FIXME - mov support is only working perfectly on Little Endian systems?!"
-//#ifdef WORDS_BIGENDIAN
-//#define MOV_FOURCC(a,b,c,d) ((d)|(c<<8)|(b<<16)|(a<<24))
-//#else
 #define MOV_FOURCC(a,b,c,d) ((a<<24)|(b<<16)|(c<<8)|(d))
-//#endif
 
 int mov_check_file(demuxer_t* demuxer){
     int flags=0;
@@ -250,7 +245,7 @@
 	  break;
 	default:
 	  if(no==0) return 0; // first chunk is bad!
-	  id = bswap_32(id);
+	  id = be2me_32(id);
 	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",&id,(int)len);
 	}
 	if(!stream_skip(demuxer->stream,len-skipped)) break;
@@ -531,7 +526,7 @@
 #warning "Implement atom 'code' for FLASH support"
 	    }
 	    default:
-		id = bswap_32(id);
+		id = be2me_32(id);
 		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",&id,(int)len);
 		break;
 	  }//switch(id)
@@ -740,7 +735,7 @@
 	}
 	case MOV_FOURCC('d','c','o','m'): {
 //	    int temp=stream_read_dword(demuxer->stream);
-	    unsigned int len=bswap_32(stream_read_dword(demuxer->stream));
+	    unsigned int len=be2me_32(stream_read_dword(demuxer->stream));
 	    mp_msg(MSGT_DEMUX, MSGL_INFO, "Compressed header uses %.4s algo!\n",&len);
 	    break;
 	}
@@ -911,7 +906,7 @@
 	    break;
 	} /* eof udta */
 	default:
-	  id = bswap_32(id);
+	  id = be2me_32(id);
 	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",&id,(int)len);
 	} /* endof switch */
 	} /* endof else */




More information about the MPlayer-cvslog mailing list