summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-06-09 21:18:54 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-06-09 21:18:54 +0100
commit224cd3a6d96fd943d3375e0385841972e29e95d0 (patch)
treed3217112dae6559d3357979b4261ce7d8e8ac5fa
parent089d7ce7450a4af86f2b6426b475a2da1d451a7d (diff)
downloadxine-lib-224cd3a6d96fd943d3375e0385841972e29e95d0.tar.gz
xine-lib-224cd3a6d96fd943d3375e0385841972e29e95d0.tar.bz2
Fix Shoutcast NSV detection.
Leading whitespace could prevent this from working.
-rw-r--r--src/input/input_http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/input/input_http.c b/src/input/input_http.c
index dab7310c3..cbc2e8140 100644
--- a/src/input/input_http.c
+++ b/src/input/input_http.c
@@ -919,7 +919,10 @@ static int http_plugin_open (input_plugin_t *this_gen ) {
/* content type */
if (!strncasecmp(this->buf, TAG_CONTENT_TYPE, sizeof(TAG_CONTENT_TYPE) - 1)) {
- if (!strncasecmp(this->buf + sizeof(TAG_CONTENT_TYPE) - 1, "video/nsv", 9)) {
+ const char *type = this->buf + sizeof (TAG_CONTENT_TYPE) - 1;
+ while (isspace (*type))
+ ++type;
+ if (!strncasecmp (type, "video/nsv", 9)) {
lprintf("shoutcast nsv detected\n");
this->is_nsv = 1;
}