From 8ef87c44bb5e502574776df142dbffb810e36a00 Mon Sep 17 00:00:00 2001 From: rtognimp Date: Sat, 1 May 2004 23:35:25 +0000 Subject: 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 --- libmpdemux/network.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 \n"); + } } break; #ifdef STREAMING_LIVE_DOT_COM -- cgit v1.2.3