[FFmpeg-devel] [PATCH] Add Apple HTTP Live Streaming protocol handler
Ronald S. Bultje
rsbultje
Wed Aug 4 21:12:05 CEST 2010
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).
Looking at #2 now.
Ronald
More information about the ffmpeg-devel
mailing list