PR #23071 opened by Kacper Michajłow (kasper93) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23071 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23071.patch
From c89968534812a98613e9b45c28b3ff6280299c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Mon, 11 May 2026 11:07:59 +0200 Subject: [PATCH 1/3] avformat/dashdec: respect io_open set in AVFormatContext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit io_open_default() will call internal impl if needed, don't call it directly. Signed-off-by: Kacper Michajłow <[email protected]> --- libavformat/dashdec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index cf6c542d5f..cac2250634 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -455,7 +455,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, av_freep(pb); av_dict_copy(&tmp, *opts, 0); av_dict_copy(&tmp, opts2, 0); - ret = ffio_open_whitelist(pb, url, AVIO_FLAG_READ, c->interrupt_callback, &tmp, s->protocol_whitelist, s->protocol_blacklist); + ret = s->io_open(s, pb, url, AVIO_FLAG_READ, &tmp); if (ret >= 0) { // update cookies on http response with setcookies. char *new_cookies = NULL; @@ -1287,7 +1287,7 @@ static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in) close_in = 1; av_dict_copy(&opts, c->avio_opts, 0); - ret = ffio_open_whitelist(&in, url, AVIO_FLAG_READ, c->interrupt_callback, &opts, s->protocol_whitelist, s->protocol_blacklist); + ret = s->io_open(s, &in, url, AVIO_FLAG_READ, &opts); av_dict_free(&opts); if (ret < 0) return ret; @@ -1430,7 +1430,7 @@ cleanup: av_bprint_finalize(&buf, NULL); if (close_in) { - avio_close(in); + ff_format_io_close(s, &in); } return ret; } -- 2.52.0 From 1582f74ab734e0f24dc41c7126b837b43d4a2b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Mon, 11 May 2026 11:09:11 +0200 Subject: [PATCH 2/3] avformat/dashenc: respect io_open set in AVFormatContext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit io_open_default() will call internal impl if needed, don't call it directly. Signed-off-by: Kacper Michajłow <[email protected]> --- libavformat/dashenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index da7725fc3f..1b9c6a601f 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -490,7 +490,7 @@ static void dash_free(AVFormatContext *s) if (!c->single_file) ffio_free_dyn_buf(&os->ctx->pb); else - avio_close(os->ctx->pb); + ff_format_io_close(s, &os->ctx->pb); } ff_format_io_close(s, &os->out); avformat_free_context(os->ctx); @@ -1458,7 +1458,7 @@ static int dash_init(AVFormatContext *s) ret = s->io_open(s, &os->out, filename, AVIO_FLAG_WRITE, &opts); } else { ctx->url = av_strdup(filename); - ret = avio_open2(&ctx->pb, filename, AVIO_FLAG_WRITE, NULL, &opts); + ret = s->io_open(s, &ctx->pb, filename, AVIO_FLAG_WRITE, &opts); } av_dict_free(&opts); if (ret < 0) -- 2.52.0 From 09f9eb4ee498f2f759af8b0b1becb2ba53372735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Mon, 11 May 2026 11:10:27 +0200 Subject: [PATCH 3/3] avformat/hlsenc: respect io_open set in AVFormatContext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit io_open_default() will call internal impl if needed, don't call it directly. Signed-off-by: Kacper Michajłow <[email protected]> --- libavformat/hlsenc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index df24b17ab6..62f2a624b3 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1165,9 +1165,7 @@ static int parse_playlist(AVFormatContext *s, const char *url, VariantStream *vs const char *end; double discont_program_date_time = 0; - if ((ret = ffio_open_whitelist(&in, url, AVIO_FLAG_READ, - &s->interrupt_callback, NULL, - s->protocol_whitelist, s->protocol_blacklist)) < 0) + if ((ret = s->io_open(s, &in, url, AVIO_FLAG_READ, NULL)) < 0) return ret; ff_get_chomp_line(in, line, sizeof(line)); @@ -1277,7 +1275,7 @@ static int parse_playlist(AVFormatContext *s, const char *url, VariantStream *vs } fail: - avio_close(in); + ff_format_io_close(s, &in); return ret; } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
