[SCM] libav/experimental: applehttp: Fix the key check in handle_variant_args

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:22:33 UTC 2013


The following commit has been merged in the experimental branch:
commit 2b0decf60ba6dd5eec16e88d4b816e56108a2935
Author: Martin Storsjö <martin at martin.st>
Date:   Sun Jan 23 23:39:02 2011 +0200

    applehttp: Fix the key check in handle_variant_args
    
    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 at mansr.com>

diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index b73adcc..6f03548 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -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)
 {
-    if (strncmp(key, "BANDWIDTH", key_len)) {
+    if (!strncmp(key, "BANDWIDTH=", key_len)) {
         *dest     =        info->bandwidth;
         *dest_len = sizeof(info->bandwidth);
     }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list