comparison libmpdemux/open.c @ 4046:f732854e3d16

Kept the HTTP connection open after autodetect, so we don't need to reopen and request a second time.
author bertrand
date Tue, 08 Jan 2002 07:31:29 +0000
parents d3fc41a04cb7
children 925046ea34ec
comparison
equal deleted inserted replaced
4045:898caa690c0b 4046:f732854e3d16
370 } 370 }
371 371
372 #ifdef STREAMING 372 #ifdef STREAMING
373 url = url_new(filename); 373 url = url_new(filename);
374 if(url) { 374 if(url) {
375 (*file_format)=autodetectProtocol( url, &f ); 375 streaming_ctrl_t *streaming_ctrl;
376 streaming_ctrl = streaming_ctrl_new();
377 if( streaming_ctrl==NULL ) return NULL;
378 streaming_ctrl->url = url_copy( url );
379 if( autodetectProtocol( streaming_ctrl, &f, file_format )<0 ) {
380 mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_UnableOpenURL, filename );
381 return NULL;
382 }
376 mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ConnToServer, url->hostname ); 383 mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ConnToServer, url->hostname );
377 stream=new_stream(f,STREAMTYPE_STREAM); 384 stream=new_stream(f,STREAMTYPE_STREAM);
378 if( streaming_start( stream , url, *file_format )<0){ 385 stream->streaming_ctrl = streaming_ctrl;
386 //if( streaming_start( stream , url, *file_format )<0){
387 if( streaming_start( stream, *file_format )<0){
379 mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_UnableOpenURL, filename); 388 mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_UnableOpenURL, filename);
380 url_free(url); 389 url_free(url);
381 return NULL; 390 return NULL;
382 } 391 }
383 url_free(url); 392 url_free(url);