Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Kacper Michajłow" <code@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH] avformat/hls: fix handle_init_section_args callback type (PR #20124)
Date: Tue,  5 Aug 2025 20:33:52 +0300 (EEST)
Message-ID: <20250805173352.44ADD68C936@ffbox0-bg.ffmpeg.org> (raw)

PR #20124 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20124
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20124.patch


From 9e0c4693414bc97587d234b60c76a2470ee45e0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
Date: Mon, 4 Aug 2025 02:42:28 +0200
Subject: [PATCH 1/2] avutil/tx: zero whole array, not only one element
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
 libavutil/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/tx.c b/libavutil/tx.c
index 0aae4c7cf7..05c132ada1 100644
--- a/libavutil/tx.c
+++ b/libavutil/tx.c
@@ -284,7 +284,7 @@ static void reset_ctx(AVTXContext *s, int free_sub)
      * ff_tx_init_subtx() call is made. */
     s->nb_sub = 0;
     s->opaque = NULL;
-    memset(s->fn, 0, sizeof(*s->fn));
+    memset(s->fn, 0, sizeof(s->fn));
 }
 
 void ff_tx_clear_ctx(AVTXContext *s)
-- 
2.49.1


From a8b32a0b0a5f3cea033842b43ce293bbb8d761bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
Date: Tue, 5 Aug 2025 19:26:50 +0200
Subject: [PATCH 2/2] avformat/hls: fix handle_init_section_args callback type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes: utils.c:524:9: runtime error: call to function
       handle_init_section_args through pointer to incorrect function type
       'void (*)(void *, const char *, int, char **, int *)'

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
 libavformat/hls.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 505fb6146f..22ee1c6872 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -462,9 +462,10 @@ static struct segment *new_init_section(struct playlist *pls,
     return sec;
 }
 
-static void handle_init_section_args(struct init_section_info *info, const char *key,
-                                           int key_len, char **dest, int *dest_len)
+static void handle_init_section_args(void *context, const char *key,
+                                     int key_len, char **dest, int *dest_len)
 {
+    struct init_section_info *info = context;
     if (!strncmp(key, "URI=", key_len)) {
         *dest     =        info->uri;
         *dest_len = sizeof(info->uri);
@@ -916,8 +917,7 @@ static int parse_playlist(HLSContext *c, const char *url,
             ret = ensure_playlist(c, &pls, url);
             if (ret < 0)
                 goto fail;
-            ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_init_section_args,
-                               &info);
+            ff_parse_key_value(ptr, handle_init_section_args, &info);
             cur_init_section = new_init_section(pls, &info, url);
             if (!cur_init_section) {
                 ret = AVERROR(ENOMEM);
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

                 reply	other threads:[~2025-08-05 17:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250805173352.44ADD68C936@ffbox0-bg.ffmpeg.org \
    --to=code@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git