[Mplayer-cvslog] CVS: main/libmpdemux asfheader.c,1.31,1.32

Arpi of Ize arpi at mplayerhq.hu
Sat May 25 14:56:59 CEST 2002


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

Modified Files:
	asfheader.c 
Log Message:
On the sun all int32 objects have to be aligned on 32 bit boundaries.  With
this patch the asf-files run well on sparc/solaris
patch by Martin Olschewski <olschewski at zpr.uni-koeln.de>


Index: asfheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/asfheader.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- asfheader.c	14 Apr 2002 05:53:36 -0000	1.31
+++ asfheader.c	25 May 2002 12:56:56 -0000	1.32
@@ -301,7 +301,8 @@
         for( i=0 ; i<stream_count && ptr<((char*)object+objh.size) ; i++ ) {
           stream_id = le2me_16(*(uint16_t*)ptr);
           ptr += sizeof(uint16_t);
-          max_bitrate = le2me_32(*(uint32_t*)ptr);
+          memcpy(&max_bitrate, ptr, sizeof(uint32_t));// workaround unaligment bug on sparc
+          max_bitrate = le2me_32(max_bitrate);
           ptr += sizeof(uint32_t);
           printf("   stream id=[0x%x][%u]\n", stream_id, stream_id );
           printf("   max bitrate=[0x%x][%u]\n", max_bitrate, max_bitrate );




More information about the MPlayer-cvslog mailing list