PR #25068 opened by Kacper Michajłow (kasper93) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25068 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25068.patch
Use the location of the manifest as the base of relative BaseURL elements and segment templates, as the hls demuxer does. From d8f724d4cc675be0bebdc2e306efd217f057dc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Wed, 14 Oct 2026 11:16:49 +0200 Subject: [PATCH] avformat/dashdec: resolve relative URLs against the location after redirects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the location of the manifest as the base of relative BaseURL elements and segment templates, as the hls demuxer does. Signed-off-by: Kacper Michajłow <[email protected]> --- libavformat/dashdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 90a5897b38..e72e8f0bb4 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1318,6 +1318,12 @@ static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in) if (av_opt_get(in, "location", AV_OPT_SEARCH_CHILDREN, (uint8_t**)&c->base_url) < 0) c->base_url = av_strdup(url); + if (!c->base_url) { + if (close_in) + ff_format_io_close(s, &in); + return AVERROR(ENOMEM); + } + url = c->base_url; av_bprint_init(&buf, 0, INT_MAX); // xmlReadMemory uses integer bufsize -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
