diff options
author | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-05-01 23:35:25 +0000 |
---|---|---|
committer | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-05-01 23:35:25 +0000 |
commit | 8ef87c44bb5e502574776df142dbffb810e36a00 (patch) | |
tree | cf52c4fcf365f714f31ceaeb619579c987dbfe59 /libmpdemux/network.c | |
parent | c152543c4148469c9399bc9f01fdfd6ce5351435 (diff) | |
download | mpv-8ef87c44bb5e502574776df142dbffb810e36a00.tar.bz2 mpv-8ef87c44bb5e502574776df142dbffb810e36a00.tar.xz |
Try to get an asf file with normal http protocol if http streaming
fail. Patch by adland
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12391 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/network.c')
-rw-r--r-- | libmpdemux/network.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libmpdemux/network.c b/libmpdemux/network.c index 60ee3f0a38..35366b768f 100644 --- a/libmpdemux/network.c +++ b/libmpdemux/network.c @@ -1259,8 +1259,20 @@ try_livedotcom: // so we need to pass demuxer_type too ret = asf_streaming_start( stream, demuxer_type ); if( ret<0 ) { + //sometimes a file is just on a webserver and it is not streamed. + //try loading them default method as last resort for http protocol + if ( !strcasecmp(stream->streaming_ctrl->url->protocol, "http") ) { + mp_msg(MSGT_NETWORK,MSGL_STATUS,"Trying default streaming for http protocol\n "); + //reset stream + close(stream->fd); + stream->fd=-1; + ret=nop_streaming_start(stream); + } + + if (ret<0) { mp_msg(MSGT_NETWORK,MSGL_ERR,"asf_streaming_start failed\n"); mp_msg(MSGT_NETWORK,MSGL_STATUS,"Check if this is a playlist which requires -playlist option\nExample: mplayer -playlist <url>\n"); + } } break; #ifdef STREAMING_LIVE_DOT_COM |