Commit 74cbdba8 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* forwardport [18336]:

 - Only try Real RTSP in case of rtsp:// realrtsp:// or pnm://
 - Don't use fprintf
parent 9822f194
......@@ -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;
......
......@@ -673,7 +673,7 @@ rmff_header_t *real_setup_and_get_header(rtsp_client_t *rtsp_session, int bandw
if( rtsp_read_data(rtsp_session, (uint8_t*)description, size) <= 0)
goto error;
description[size]=0;
fprintf(stderr, "%s", description);
//fprintf(stderr, "%s", description);
/* parse sdp (sdpplin) and create a header and a subscribe string */
subscribe = (char *) malloc(sizeof(char)*256);
......
......@@ -142,7 +142,7 @@ static int rtsp_get_status_code( rtsp_client_t *rtsp, const char *psz_string )
if( i_code != 200 )
{
fprintf( stderr, "librtsp: server responds: '%s'\n", psz_string );
//fprintf( stderr, "librtsp: server responds: '%s'\n", psz_string );
}
return i_code;
......@@ -249,15 +249,15 @@ static int rtsp_get_answers( rtsp_client_t *rtsp )
{
if( strcmp( buf, rtsp->p_private->session ) )
{
fprintf( stderr,
"rtsp: warning: setting NEW session: %s\n", buf );
//fprintf( stderr,
// "rtsp: warning: setting NEW session: %s\n", buf );
free( rtsp->p_private->session );
rtsp->p_private->session = strdup( buf );
}
}
else
{
fprintf( stderr, "setting session id to: %s\n", buf );
//fprintf( stderr, "setting session id to: %s\n", buf );
rtsp->p_private->session = strdup( buf );
}
free( buf );
......@@ -422,7 +422,7 @@ int rtsp_read_data( rtsp_client_t *rtsp, uint8_t *buffer, unsigned int size )
if( seq < 0 )
{
fprintf(stderr, "warning: cseq not recognized!\n");
//fprintf(stderr, "warning: cseq not recognized!\n");
seq = 1;
}
......@@ -515,13 +515,13 @@ int rtsp_connect( rtsp_client_t *rtsp, const char *psz_mrl,
}
free( mrl_ptr );
fprintf( stderr, "got mrl: %s %i %s\n", s->host, s->port, s->path );
//fprintf( stderr, "got mrl: %s %i %s\n", s->host, s->port, s->path );
s->s = rtsp->pf_connect( rtsp->p_userdata, s->host, s->port );
if( s->s < 0 )
{
fprintf(stderr, "rtsp: failed to connect to '%s'\n", s->host);
//fprintf(stderr, "rtsp: failed to connect to '%s'\n", s->host);
rtsp_close( rtsp );
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment