diff options
author | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-20 21:38:11 +0000 |
---|---|---|
committer | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-20 21:38:11 +0000 |
commit | b1bee536f05c2fe75eb646959df2662abfd88116 (patch) | |
tree | c0639e554fd721c9f5f1e50dfc931861fb321911 /libmpdemux/asf_streaming.c | |
parent | ef87ddc7a937a061011e896f87eed778e2236729 (diff) | |
download | mpv-b1bee536f05c2fe75eb646959df2662abfd88116.tar.bz2 mpv-b1bee536f05c2fe75eb646959df2662abfd88116.tar.xz |
Changed the asf_file_header_t struct to read all the fields properly.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4289 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/asf_streaming.c')
-rw-r--r-- | libmpdemux/asf_streaming.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libmpdemux/asf_streaming.c b/libmpdemux/asf_streaming.c index 3d23b4296c..2fcc2b019f 100644 --- a/libmpdemux/asf_streaming.c +++ b/libmpdemux/asf_streaming.c @@ -209,15 +209,16 @@ asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl) { pos += sizeof(objh); memcpy(&fileh,buffer + pos,sizeof(fileh)); le2me_ASF_file_header_t(&fileh); +/* if(fileh.packetsize != fileh.packetsize2) { printf("Error packetsize check don't match\n"); return -1; } - asf_ctrl->packet_size = fileh.packetsize; - // FIXME: preroll contains the amount of time to bufferize - // before playing. To be able to do that we need to - // read the timestamp of the first data packet and bufferize. - streaming_ctrl->prebuffer_size = fileh.preroll; +*/ + asf_ctrl->packet_size = fileh.max_packet_size; + // before playing. + // preroll: time in ms to bufferize before playing + streaming_ctrl->prebuffer_size = (unsigned int)((double)((double)fileh.preroll/1000)*((double)fileh.max_bitrate/8)); pos += sizeof(fileh); break; case 0xB7DC0791 : // stream header @@ -655,9 +656,8 @@ asf_http_streaming_start( stream_t *stream ) { } else { stream->streaming_ctrl->streaming_read = asf_http_streaming_read; stream->streaming_ctrl->streaming_seek = asf_http_streaming_seek; + stream->streaming_ctrl->buffering = 1; } - stream->streaming_ctrl->prebuffer_size = 20000; - stream->streaming_ctrl->buffering = 1; stream->streaming_ctrl->status = streaming_playing_e; http_free( http_hdr ); |