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
This commit is contained in:
rtognimp 2004-05-01 23:35:25 +00:00
parent c152543c41
commit 8ef87c44bb
1 changed files with 12 additions and 0 deletions

View File

@ -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