summaryrefslogtreecommitdiffstats
path: root/libmpdemux/open.c
diff options
context:
space:
mode:
authorbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-08 07:31:29 +0000
committerbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-08 07:31:29 +0000
commit61b0de3564ce037dd22e2e02cb6a64e5e2ead9bc (patch)
tree1335c19f140c48468f40a6bdee05b0c418d1b446 /libmpdemux/open.c
parent1f630b5ebd8675efde515f6d2353bb6732f902eb (diff)
downloadmpv-61b0de3564ce037dd22e2e02cb6a64e5e2ead9bc.tar.bz2
mpv-61b0de3564ce037dd22e2e02cb6a64e5e2ead9bc.tar.xz
Kept the HTTP connection open after autodetect, so
we don't need to reopen and request a second time. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4047 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/open.c')
-rw-r--r--libmpdemux/open.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libmpdemux/open.c b/libmpdemux/open.c
index c915905781..e4d8177035 100644
--- a/libmpdemux/open.c
+++ b/libmpdemux/open.c
@@ -372,10 +372,19 @@ tv_err:
#ifdef STREAMING
url = url_new(filename);
if(url) {
- (*file_format)=autodetectProtocol( url, &f );
+ streaming_ctrl_t *streaming_ctrl;
+ streaming_ctrl = streaming_ctrl_new();
+ if( streaming_ctrl==NULL ) return NULL;
+ streaming_ctrl->url = url_copy( url );
+ if( autodetectProtocol( streaming_ctrl, &f, file_format )<0 ) {
+ mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_UnableOpenURL, filename );
+ return NULL;
+ }
mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ConnToServer, url->hostname );
stream=new_stream(f,STREAMTYPE_STREAM);
- if( streaming_start( stream , url, *file_format )<0){
+ stream->streaming_ctrl = streaming_ctrl;
+ //if( streaming_start( stream , url, *file_format )<0){
+ if( streaming_start( stream, *file_format )<0){
mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_UnableOpenURL, filename);
url_free(url);
return NULL;