This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 51715a5344c34944a1ce1fb56933aa5f6119fd15 Author: Kacper Michajłow <[email protected]> AuthorDate: Wed Apr 8 19:16:02 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sat Sep 19 17:00:29 2026 +0200 avformat/hls: avoid casting callback functions type Technically it's is UB to call function of different type. Fixes: src/libavformat/utils.c:531:9: runtime error: call to function handle_variant_args through pointer to incorrect function type 'void (*)(void *, const char *, int, char **, int *)' src/libavformat/hls.c:379: note: handle_variant_args defined here Signed-off-by: Kacper Michajłow <[email protected]> (cherry picked from commit d768bd564ee66a57d1ebd828d05fa1347ca94f12) --- libavformat/hls.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 998c75836d..b3d54ce108 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -374,9 +374,10 @@ static struct variant *new_variant(HLSContext *c, struct variant_info *info, return var; } -static void handle_variant_args(struct variant_info *info, const char *key, +static void handle_variant_args(void *context, const char *key, int key_len, char **dest, int *dest_len) { + struct variant_info *info = context; if (!strncmp(key, "BANDWIDTH=", key_len)) { *dest = info->bandwidth; *dest_len = sizeof(info->bandwidth); @@ -398,9 +399,10 @@ struct key_info { char iv[35]; }; -static void handle_key_args(struct key_info *info, const char *key, +static void handle_key_args(void *context, const char *key, int key_len, char **dest, int *dest_len) { + struct key_info *info = context; if (!strncmp(key, "METHOD=", key_len)) { *dest = info->method; *dest_len = sizeof(info->method); @@ -872,12 +874,10 @@ static int parse_playlist(HLSContext *c, const char *url, } is_variant = 1; memset(&variant_info, 0, sizeof(variant_info)); - ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_variant_args, - &variant_info); + ff_parse_key_value(ptr, handle_variant_args, &variant_info); } else if (av_strstart(line, "#EXT-X-KEY:", &ptr)) { struct key_info info = {{0}}; - ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_key_args, - &info); + ff_parse_key_value(ptr, handle_key_args, &info); key_type = KEY_NONE; has_iv = 0; if (!strcmp(info.method, "AES-128")) @@ -897,8 +897,7 @@ static int parse_playlist(HLSContext *c, const char *url, ret = AVERROR_INVALIDDATA; goto fail; } - ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_rendition_args, - &info); + ff_parse_key_value(ptr, handle_rendition_args, &info); new_rendition(c, &info, url); } else if (av_strstart(line, "#EXT-X-TARGETDURATION:", &ptr)) { int64_t t; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
