X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Frtsp%2Faccess.c;h=af182cccc44cc04c425705ccb65087d76085fe12;hb=6ee1e193fd896ab9a4729fde14f009d9ce629815;hp=34a83dbe35deda8fe5c9bb36eaff1ed49978d03a;hpb=017f4aed2b29fb7cd2785cf1b74f3ed6719af29b;p=vlc diff --git a/modules/access/rtsp/access.c b/modules/access/rtsp/access.c index 34a83dbe35..af182cccc4 100644 --- a/modules/access/rtsp/access.c +++ b/modules/access/rtsp/access.c @@ -25,10 +25,10 @@ * Preamble *****************************************************************************/ #include -#include -#include +#include +#include -#include "network.h" +#include #include "rtsp.h" #include "real.h" @@ -90,7 +90,7 @@ static int RtspConnect( void *p_userdata, char *psz_server, int i_port ) if( p_sys->fd < 0 ) { msg_Err( p_access, "cannot connect to %s:%d", psz_server, i_port ); - intf_UserFatal( p_access, VLC_FALSE, _("Connection failed"), + intf_UserFatal( p_access, VLC_FALSE, _("Connection failed"), _("VLC could not connect to \"%s:%d\"."), psz_server, i_port ); return VLC_EGENERIC; } @@ -153,6 +153,14 @@ static int Open( vlc_object_t *p_this ) char *psz_server = 0; int i_result; + if( !p_access->psz_access || ( + strncmp( p_access->psz_access, "rtsp", 4 ) && + strncmp( p_access->psz_access, "pnm", 3 ) && + strncmp( p_access->psz_access, "realrtsp", 8 ) )) + { + return VLC_EGENERIC; + } + p_access->pf_read = NULL; p_access->pf_block = BlockRead; p_access->pf_seek = Seek; @@ -216,7 +224,7 @@ static int Open( vlc_object_t *p_this ) msg_Err( p_access, "rtsp session can not be established" ); - intf_UserFatal( p_access, VLC_FALSE, _("Session failed"), + intf_UserFatal( p_access, VLC_FALSE, _("Session failed"), _("The requested RTSP session could not be established.") ); goto error; }