Mercurial > mplayer.hg
changeset 6187:50858d90c8d0
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@zpr.uni-koeln.de>
author | arpi |
---|---|
date | Sat, 25 May 2002 12:56:56 +0000 |
parents | c16a5fe3008f |
children | 39a9515c633a |
files | libmpdemux/asfheader.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/asfheader.c Sat May 25 11:42:40 2002 +0000 +++ b/libmpdemux/asfheader.c Sat May 25 12:56:56 2002 +0000 @@ -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 );