diff options
author | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-14 05:53:36 +0000 |
---|---|---|
committer | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-14 05:53:36 +0000 |
commit | a600c5d79611bd0d11bfa5d4f405ff043667676d (patch) | |
tree | e709dcda6cf8fdc78aedb7296d251c486f238135 /libmpdemux/asfheader.c | |
parent | 956439594b0dd49b945431e2c2058a8ed7879262 (diff) | |
download | mpv-a600c5d79611bd0d11bfa5d4f405ff043667676d.tar.bz2 mpv-a600c5d79611bd0d11bfa5d4f405ff043667676d.tar.xz |
Changed the big handling to make it use mplayer's endian macros.
(reworked of the patch from Guillaume Morin <guillaume@morinfr.org>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5619 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/asfheader.c')
-rw-r--r-- | libmpdemux/asfheader.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c index 4c6c141abf..d00fe92cb5 100644 --- a/libmpdemux/asfheader.c +++ b/libmpdemux/asfheader.c @@ -293,19 +293,16 @@ while(!stream_eof(demuxer->stream)){ stream_read( demuxer->stream, object, objh.size ); // FIXME: We need some endian handling below... ptr = object; - stream_count = *(uint16_t*)ptr; + stream_count = le2me_16(*(uint16_t*)ptr); ptr += sizeof(uint16_t); if(stream_count > 0) streams = (uint32_t*)malloc(2*stream_count*sizeof(uint32_t)); printf(" stream count=[0x%x][%u]\n", stream_count, stream_count ); for( i=0 ; i<stream_count && ptr<((char*)object+objh.size) ; i++ ) { - stream_id = *(uint16_t*)ptr; + stream_id = le2me_16(*(uint16_t*)ptr); ptr += sizeof(uint16_t); - max_bitrate = *(uint32_t*)ptr; + max_bitrate = le2me_32(*(uint32_t*)ptr); ptr += sizeof(uint32_t); -#ifdef WORDS_BIGENDIAN - stream_id=bswap_16(stream_id); max_bitrate=bswap_32(max_bitrate); -#endif printf(" stream id=[0x%x][%u]\n", stream_id, stream_id ); printf(" max bitrate=[0x%x][%u]\n", max_bitrate, max_bitrate ); streams[2*i] = stream_id; |