[FFmpeg-devel] [PATCH] applehttp: Fix the key check in handle_variant_args (original) (raw)

Ronald S. Bultje rsbultje
Mon Jan 24 19:08:44 CET 2011


Hi,

On Mon, Jan 24, 2011 at 4:11 AM, Martin Storsj? wrote:

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. --- ?libavformat/applehttp.c | ? ?2 +- ?1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c index b73adcc..c35a1f1 100644 --- a/libavformat/applehttp.c +++ b/libavformat/applehttp.c @@ -181,7 +181,7 @@ struct variantinfo { ?static void handlevariantargs(struct variantinfo *info, const char *key, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? int keylen, char **dest, int *destlen) ?{ - ? ?if (strncmp(key, "BANDWIDTH", keylen)) { + ? ?if (!strncmp(key, "BANDWIDTH", keylen)) { ? ? ? ? *dest ? ? = ? ? ? ?info->bandwidth; ? ? ? ? *destlen = sizeof(info->bandwidth); ? ? } -- 1.7.3.1

You're not adding the '=' char to the string.

Ronald



More information about the ffmpeg-devel mailing list