diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-06 18:16:11 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-06 18:16:11 +0000 |
commit | 42ce6511351061cb3ec870eb6f31d435f22e672d (patch) | |
tree | 64e13d3a025a2f13947eb9b56712e1b96ec991ad /libmpdemux/stream_netstream.c | |
parent | 73257ca2757e45a60ea5012e742b63fedd357ac2 (diff) | |
download | mpv-42ce6511351061cb3ec870eb6f31d435f22e672d.tar.bz2 mpv-42ce6511351061cb3ec870eb6f31d435f22e672d.tar.xz |
It should now be endian aware. Untested as i only have le box :(
Would be cool if someone with a be,le network could test.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9864 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/stream_netstream.c')
-rw-r--r-- | libmpdemux/stream_netstream.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libmpdemux/stream_netstream.c b/libmpdemux/stream_netstream.c index 1f21b5f6af..eb4888e89e 100644 --- a/libmpdemux/stream_netstream.c +++ b/libmpdemux/stream_netstream.c @@ -57,6 +57,7 @@ #include "help_mp.h" #include "../m_option.h" #include "../m_struct.h" +#include "../bswap.h" #include "netstream.h" @@ -158,7 +159,7 @@ static mp_net_stream_packet_t* send_net_stream_cmd(stream_t *s,uint16_t cmd,char } static int fill_buffer(stream_t *s, char* buffer, int max_len){ - uint16_t len = max_len; + uint16_t len = le2me_16(max_len); mp_net_stream_packet_t* pack; pack = send_net_stream_cmd(s,NET_STREAM_FILL_BUFFER,(char*)&len,2); @@ -179,7 +180,7 @@ static int fill_buffer(stream_t *s, char* buffer, int max_len){ static int seek(stream_t *s,off_t newpos) { - uint64_t pos = (uint64_t)newpos; + uint64_t pos = le2me_64((uint64_t)newpos); mp_net_stream_packet_t* pack; pack = send_net_stream_cmd(s,NET_STREAM_SEEK,(char*)&pos,8); @@ -259,6 +260,8 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { } opened = (mp_net_stream_opened_t*)pack->data; + net_stream_opened_2_me(opened); + *file_format = opened->file_format; stream->flags = opened->flags; stream->sector_size = opened->sector_size; |