Commit fd4af96c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

http: match content-type with forced demux

parent d9ef65a4
......@@ -987,9 +987,17 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
case ACCESS_GET_CONTENT_TYPE:
*va_arg( args, char ** ) =
p_sys->psz_mime ? strdup( p_sys->psz_mime ) : NULL;
{
char **type = va_arg( args, char ** );
if( p_sys->b_icecast && p_sys->psz_mime == NULL )
*type = strdup( "audio/mpeg" );
else if( !strcasecmp( p_access->psz_access, "itpc" ) )
*type = strdup( "application/rss+xml" );
else
*type = strdup( p_sys->psz_mime );
break;
}
default:
return VLC_EGENERIC;
......@@ -1232,6 +1240,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
{
p_sys->psz_protocol = "ICY";
p_sys->i_code = atoi( &psz[4] );
p_sys->b_icecast = true;
p_sys->b_reconnect = true;
}
else
......
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