summaryrefslogtreecommitdiffstats
path: root/stream/asf_streaming.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-21 11:56:18 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-21 11:56:18 +0000
commitbfef84e32fae93b1e4a0d00020def972f8f964a7 (patch)
tree1c27ffa705cc700d8bc749e8aa529e59dd32dbb4 /stream/asf_streaming.c
parent023446528bbd59aa73ed389bcf5616f4319bb636 (diff)
downloadmpv-bfef84e32fae93b1e4a0d00020def972f8f964a7.tar.bz2
mpv-bfef84e32fae93b1e4a0d00020def972f8f964a7.tar.xz
Simplify a little bit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25487 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/asf_streaming.c')
-rw-r--r--stream/asf_streaming.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/stream/asf_streaming.c b/stream/asf_streaming.c
index 87b11924f1..856cc1cd12 100644
--- a/stream/asf_streaming.c
+++ b/stream/asf_streaming.c
@@ -175,7 +175,6 @@ static int max_idx(int s_count, int *s_rates, int bound) {
}
static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl) {
- ASF_header_t asfh;
ASF_stream_chunck_t chunk;
asf_http_streaming_ctrl_t* asf_ctrl = streaming_ctrl->data;
char* buffer=NULL, *chunk_buffer=NULL;
@@ -227,20 +226,19 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl)
return -1;
if( chunk_size2read==0 ) {
- if(size < (int)sizeof(asfh)) {
+ ASF_header_t *asfh = (ASF_header_t *)buffer;
+ if(size < (int)sizeof(ASF_header_t)) {
mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrChunk2Small);
return -1;
} else mp_msg(MSGT_NETWORK,MSGL_DBG2,"Got chunk\n");
- memcpy(&asfh,buffer,sizeof(asfh));
- le2me_ASF_header_t(&asfh);
- chunk_size2read = asfh.objh.size;
+ chunk_size2read = AV_RL64(&asfh->objh.size);
mp_msg(MSGT_NETWORK,MSGL_DBG2,"Size 2 read=%d\n", chunk_size2read);
}
} while( buffer_size<chunk_size2read);
buffer = chunk_buffer;
size = buffer_size;
- start = sizeof(asfh);
+ start = sizeof(ASF_header_t);
pos = find_asf_guid(buffer, asf_file_header_guid, start, size);
if (pos >= 0) {