Commit 29a99a61 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

SAP: don't try to parse media subtype for now, should fix #1467

parent d07aa56b
...@@ -910,7 +910,7 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp ) ...@@ -910,7 +910,7 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
char *psz_eof = NULL; char *psz_eof = NULL;
char *psz_parse = NULL; char *psz_parse = NULL;
char *psz_uri = NULL; char *psz_uri = NULL;
char *psz_proto = NULL; const char *psz_proto = NULL;
char psz_source[258] = ""; char psz_source[258] = "";
int i_port = 0; int i_port = 0;
...@@ -1041,31 +1041,33 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp ) ...@@ -1041,31 +1041,33 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
if( psz_eof ) if( psz_eof )
{ {
*psz_eof = '\0'; *psz_eof = '\0';
psz_proto = strdup( psz_parse );
psz_parse = psz_eof + 1;
p_sdp->i_media_type = atoi( psz_parse );
if( !strcmp( psz_parse, "RTP/AVP" ) )
{
psz_proto = "rtp";
p_sdp->i_media_type = atoi( psz_parse );
}
else
if( !strcasecmp( psz_parse, "udp" ) )
{
psz_proto = "udp";
p_sdp->i_media_type = 33;
}
else
{
msg_Warn( p_obj, "unknown transport protocol %s", psz_parse );
FREE( psz_uri );
return VLC_EGENERIC;
}
} }
else else
{ {
msg_Dbg( p_obj, "incorrect m field, %s", p_sdp->psz_media ); msg_Warn( p_obj, "unknown top parse m field (3)" );
p_sdp->i_media_type = 33; FREE( psz_uri );
psz_proto = strdup( psz_parse ); return VLC_EGENERIC;
} }
} }
if( psz_proto && !strncmp( psz_proto, "RTP/AVP", 7 ) )
{
free( psz_proto );
psz_proto = strdup( "rtp" );
}
if( psz_proto && !strncasecmp( psz_proto, "UDP", 3 ) )
{
free( psz_proto );
psz_proto = strdup( "udp" );
}
/* FIXME: HTTP support */ /* FIXME: HTTP support */
if( i_port == 0 ) if( i_port == 0 )
...@@ -1092,7 +1094,6 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp ) ...@@ -1092,7 +1094,6 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
psz_uri, i_port ); psz_uri, i_port );
FREE( psz_uri ); FREE( psz_uri );
FREE( psz_proto );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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