From 6b633dbfa225847d8d0767c5904884d5218a845e Mon Sep 17 00:00:00 2001 From: Frank Schmirler Date: Wed, 19 Oct 2011 23:21:38 +0200 Subject: the icy-name HTTP header sent with radio streams makes VLC pick the wrong demuxer. Send icy-name only for ES audio streams (fixes #746) --- server/connectionHTTP.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/connectionHTTP.c b/server/connectionHTTP.c index 54ccf5a..ffcc924 100644 --- a/server/connectionHTTP.c +++ b/server/connectionHTTP.c @@ -161,11 +161,15 @@ bool cConnectionHTTP::ProcessRequest(void) LOG_ERROR_STR("unable to set DSCP sockopt"); if (m_StreamType == stEXT) { return Respond("HTTP/1.0 200 OK"); - } else if (ISRADIO(m_Channel) || (m_StreamType == stES && (m_Apid[0] || m_Dpid[0]))) { + } else if (m_StreamType == stES && (m_Apid[0] || m_Dpid[0] || ISRADIO(m_Channel))) { return Respond("HTTP/1.0 200 OK") && Respond("Content-Type: audio/mpeg") && Respond("icy-name: %s", true, m_Channel->Name()) && Respond(""); + } else if (ISRADIO(m_Channel)) { + return Respond("HTTP/1.0 200 OK") + && Respond("Content-Type: audio/mpeg") + && Respond(""); } else { return Respond("HTTP/1.0 200 OK") && Respond("Content-Type: video/mpeg") @@ -193,11 +197,15 @@ bool cConnectionHTTP::ProcessRequest(void) // TODO return Respond("HTTP/1.0 200 OK") && Respond(""); - } else if (ISRADIO(m_Channel) || (m_StreamType == stES && (m_Apid[0] || m_Dpid[0]))) { + } else if (m_StreamType == stES && (m_Apid[0] || m_Dpid[0] || ISRADIO(m_Channel))) { return Respond("HTTP/1.0 200 OK") && Respond("Content-Type: audio/mpeg") && Respond("icy-name: %s", true, m_Channel->Name()) && Respond(""); + } else if (ISRADIO(m_Channel)) { + return Respond("HTTP/1.0 200 OK") + && Respond("Content-Type: audio/mpeg") + && Respond(""); } else { return Respond("HTTP/1.0 200 OK") && Respond("Content-Type: video/mpeg") -- cgit v1.2.3