[FFmpeg-devel] [PATCH] applehttp: Fix the key check in handle_variant_args

Martin Storsjö martin
Mon Jan 24 20:36:37 CET 2011


On Mon, 24 Jan 2011, Ronald S. Bultje wrote:

> On Mon, Jan 24, 2011 at 4:11 AM, Martin Storsj? <martin at martin.st> 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 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);
> > ? ? }
> > --
> > 1.7.3.1
> 
> You're not adding the '=' char to the string.

Oh crap, thanks for noticing. Fixed patch attached.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-applehttp-Fix-the-key-check-in-handle_variant_args.patch
Type: text/x-diff
Size: 1100 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110124/bb604b0e/attachment.patch>



More information about the ffmpeg-devel mailing list