changeset 4903:d8b465e3fd88

fixed some endian issues, like changing bswap_32() -> be2me_32(), and removing FIXME #warning about endianness (seems to work fine on PPC)
author melanson
date Fri, 01 Mar 2002 03:02:25 +0000
parents 7c4edfe929c8
children 36aa273ca3ea
files libmpdemux/demux_mov.c
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Fri Mar 01 00:26:10 2002 +0000
+++ b/libmpdemux/demux_mov.c	Fri Mar 01 03:02:25 2002 +0000
@@ -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 */