[vlc-commits] http: match content-type with forced demux
Rémi Denis-Courmont
git at videolan.org
Sat Jul 25 17:10:40 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 25 17:54:00 2015 +0300| [4ffabc67bb9480e152141134de12ac84b141dc9c] | committer: Rémi Denis-Courmont
http: match content-type with forced demux
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ffabc67bb9480e152141134de12ac84b141dc9c
---
modules/access/http.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index 7a3e8a0..6574ab6 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -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
More information about the vlc-commits
mailing list