[FFmpeg-devel] [PATCH] Add Apple HTTP Live Streaming protocol handler
Martin Storsjö
martin
Thu Aug 5 22:09:44 CEST 2010
On Wed, 4 Aug 2010, Ronald S. Bultje wrote:
> Hi Martin,
>
> patch#1:
>
> On Tue, Jul 27, 2010 at 5:45 AM, Martin Storsj? <martin at martin.st> wrote:
> [..]
> > -static void handle_basic_params(HTTPAuthState *state, const char *key,
> > +static void handle_basic_params(void *context, const char *key,
> > int key_len, char **dest, int *dest_len)
> > {
> > + HTTPAuthState *state = context;
> > if (!strncmp(key, "realm=", key_len)) {
> > *dest = state->realm;
> > *dest_len = sizeof(state->realm);
> > }
> > }
> >
> > -static void handle_digest_params(HTTPAuthState *state, const char *key,
> > +static void handle_digest_params(void *context, const char *key,
> > int key_len, char **dest, int *dest_len)
> > {
> > + HTTPAuthState *state = context;
> > DigestParams *digest = &state->digest_params;
> >
> > if (!strncmp(key, "realm=", key_len)) {
> > @@ -116,9 +62,10 @@ static void handle_digest_params(HTTPAuthState *state, const char *key,
> > }
> > }
> >
> > -static void handle_digest_update(HTTPAuthState *state, const char *key,
> > +static void handle_digest_update(void *context, const char *key,
> > int key_len, char **dest, int *dest_len)
> > {
> > + HTTPAuthState *state = context;
> > DigestParams *digest = &state->digest_params;
> >
> > if (!strncmp(key, "nextnonce=", key_len)) {
>
> These extra lines should be avoidable by casting the function to a
> proper type (a typedef helps here) when passing it to the function.
> Other than that, this patch is OK, feel free to apply once #2 is OK'ed
> also (since without it, this isn't needed).
I tried doing this, but I'm not sure I agree it's prettier. The attached
patch is the diff compared to the previous version. What do you think?
// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-a-typedef-for-the-ff_parse_key_value-callback-fu.patch
Type: text/x-diff
Size: 5927 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100805/dd3539d7/attachment.patch>
More information about the ffmpeg-devel
mailing list