applehttp: Fix the key check in handle_variant_args
authorMartin Storsjö <martin@martin.st>
Sun, 23 Jan 2011 21:39:02 +0000 (23:39 +0200)
committerMans Rullgard <mans@mansr.com>
Mon, 24 Jan 2011 20:19:37 +0000 (20:19 +0000)
The key string is supposed to contain the equals character,
too.  Since the checked string was wrong, and the return value
check was wrong too, it incorrectly seemed to work right before.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavformat/applehttp.c

index b73adcc..6f03548 100644 (file)
@@ -181,7 +181,7 @@ struct variant_info {
 static void handle_variant_args(struct variant_info *info, const char *key,
                                 int key_len, char **dest, int *dest_len)
 {
 static void handle_variant_args(struct variant_info *info, const char *key,
                                 int key_len, char **dest, int *dest_len)
 {
-    if (strncmp(key, "BANDWIDTH", key_len)) {
+    if (!strncmp(key, "BANDWIDTH=", key_len)) {
         *dest     =        info->bandwidth;
         *dest_len = sizeof(info->bandwidth);
     }
         *dest     =        info->bandwidth;
         *dest_len = sizeof(info->bandwidth);
     }