Skip to content

Commit a1db389

Browse files
committed
ffmpeg 7 add a dash patch
1 parent 8d16a75 commit a1db389

12 files changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From ca6bf697d914be79fcc4d4314c06101d279b6ef3 Mon Sep 17 00:00:00 2001
2+
From: qianlongxu <qianlongxu@gmail.com>
3+
Date: Wed, 21 May 2025 18:05:52 +0800
4+
Subject: [PATCH] fix dash init fragment url is "invalid:truncated" bug
5+
6+
---
7+
libavformat/dashdec.c | 12 +++++++++++-
8+
1 file changed, 11 insertions(+), 1 deletion(-)
9+
10+
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
11+
index 0a6c46b..616187f 100644
12+
--- a/libavformat/dashdec.c
13+
+++ b/libavformat/dashdec.c
14+
@@ -477,6 +477,10 @@ static char *get_content_url(xmlNodePtr *baseurl_nodes,
15+
int i;
16+
char *text;
17+
char *url = NULL;
18+
+
19+
+ if (strlen(val) >= max_url_size) {
20+
+ max_url_size += 256;
21+
+ }
22+
char *tmp_str = av_mallocz(max_url_size);
23+
24+
if (!tmp_str)
25+
@@ -495,8 +499,14 @@ static char *get_content_url(xmlNodePtr *baseurl_nodes,
26+
}
27+
}
28+
29+
- if (val)
30+
+ if (val) {
31+
+ int tmp_max_url_size = strlen(tmp_str) + strlen(val) + 1;
32+
+ if (tmp_max_url_size > max_url_size) {
33+
+ max_url_size = tmp_max_url_size;
34+
+ tmp_str = av_realloc(tmp_str, max_url_size);
35+
+ }
36+
ff_make_absolute_url(tmp_str, max_url_size, tmp_str, val);
37+
+ }
38+
39+
if (rep_id_val) {
40+
url = av_strireplace(tmp_str, "$RepresentationID$", rep_id_val);
41+
--
42+
2.39.5 (Apple Git-154)
43+

0 commit comments

Comments
 (0)