summaryrefslogtreecommitdiffstats
path: root/libmpdemux/open.c
diff options
context:
space:
mode:
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;